updates quotationDetial object
parent
96cef024a9
commit
ff1aec3cd4
|
|
@ -202,10 +202,30 @@ public class resultClass
|
||||||
quotationMainItemDetails.Add(new quotationMainItemDetail(qItem));
|
quotationMainItemDetails.Add(new quotationMainItemDetail(qItem));
|
||||||
}
|
}
|
||||||
contactPerson = conn.QueryFirstOrDefault<contactPerson>("select * from contactPerson where contactPerson_uid = @contactPerson_uid ", new { contactPerson_uid = this.contactPerson_uid });
|
contactPerson = conn.QueryFirstOrDefault<contactPerson>("select * from contactPerson where contactPerson_uid = @contactPerson_uid ", new { contactPerson_uid = this.contactPerson_uid });
|
||||||
|
|
||||||
|
if (contactPerson == null) {
|
||||||
|
contactPerson = new contactPerson();
|
||||||
|
}
|
||||||
|
|
||||||
company = conn.QueryFirstOrDefault<company>("select * from company where company_uid = @company_uid", new { company_uid = this.company_uid} );
|
company = conn.QueryFirstOrDefault<company>("select * from company where company_uid = @company_uid", new { company_uid = this.company_uid} );
|
||||||
|
|
||||||
|
if (company == null) {
|
||||||
|
company = new company();
|
||||||
|
}
|
||||||
|
|
||||||
user = conn.QueryFirstOrDefault<user>("select * from users where user_uid = @user_uid", new { user_uid = this.quotation_create_uid});
|
user = conn.QueryFirstOrDefault<user>("select * from users where user_uid = @user_uid", new { user_uid = this.quotation_create_uid});
|
||||||
|
|
||||||
|
if (user == null) {
|
||||||
|
user = new user();
|
||||||
|
}
|
||||||
|
|
||||||
payments = conn.Query<payment>("select * from payment where payment_version = @payment_version and quotation_uid = @quotation_uid ", new { payment_version = this.quotation_version, quotation_uid = this.quotation_uid }).ToList();
|
payments = conn.Query<payment>("select * from payment where payment_version = @payment_version and quotation_uid = @quotation_uid ", new { payment_version = this.quotation_version, quotation_uid = this.quotation_uid }).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
invoices = conn.Query<invoice>("select * from invoice where invoice_version = @invoice_version and quotation_uid = @quotation_uid ", new { invoice_version = this.quotation_version, quotation_uid = this.quotation_uid }).ToList();
|
invoices = conn.Query<invoice>("select * from invoice where invoice_version = @invoice_version and quotation_uid = @quotation_uid ", new { invoice_version = this.quotation_version, quotation_uid = this.quotation_uid }).ToList();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue