public AgentUI(long AgentID) { try { InitializeComponent(); var c = Glob.CustomersAndAgents.Agents_Partial.Select_Row_Agent(AgentID); AgentIDForUpdateUse = c.ID; FirstName_Txt.Text = c.FIRST_NAME; LAST_NAMETxt.Text = c.LAST_NAME; Address_Txt.Text = c.ADDRESS; Mobile_Txt.Text = c.MOBILE_NO; EmailTxt.Text = c.EMAIL; StatusToggle.Checked = c.STATUS; Agent_From_Date_link.Text = c.AGENT_FROM.ToLongDateString(); ImageR.Image = Glob.CacheData.Glob_Veriables.GetImageFromByteArray(c.PICTURE); webcam = new WebCam(); webcam.InitializeWebCam(ref ImageR); Panel_info_Extra.Show(); // Availibility_Toggle.Show(); Panel_pictureControls.Hide(); Edit_Btn.Show(); Cancel_Edit_btn.Show(); StatusToggle.Show(); Main_Info_Panel.Enabled = false; SAVE_New_Customer_Btn.Hide(); ImageR.Region = Glob.CacheData.Glob_Veriables.GetRoundRegion(ImageR.Width, ImageR.Height); this.Text = "AGENT " + c.FIRST_NAME.ToUpper() + " ID# " + c.ID.ToString(); } catch (Exception ex) { this.Close(); MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public CompanyUI(long companyid) { try { InitializeComponent(); var rr = WARPRO.Glob.CustomersAndAgents.Glob_mainCompany.Get_CompanyRow(companyid); orignalCompanyId = rr.ID; StatusToggle.Show(); Edit_Btn.Show(); SAVE_New_COmpany_Btn.Hide(); Cancel_Edit_btn.Show(); Main_Info_Panel.Enabled = false; Panel_info_Extra.Show(); this.Text = "COMPANY ID - " + rr.ID.ToString(); StatusToggle.Checked = rr.STATUS; CompanyName_Txt.Text = rr.COMPANY_NAME; Owner_NAME_Txt.Text = rr.OWNER_NAME; Address_Txt.Text = rr.ADDRESS; Company_Mobile_Txt.Text = rr.COMPANY_MOBILE_NO; Extra_Mobile_Txt.Text = rr.EXTRA_MOBILE_NO; Owner_Mobile_Txt.Text = rr.OWNER_MOBILE_NO; EmailTxt.Text = rr.EMAIL; Extra_Email_Txt.Text = rr.EXTRA_EMAIL; Extra_Details_Txt.Text = rr.EXTRA_DETAILS; Company_From_Date_link.Text = rr.CONNECTION_DATE.ToLongDateString(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public OurCompanyProfileUI() { InitializeComponent(); webcam = new WebCam(); webcam.InitializeWebCam(ref ImageR); var rr = WARPRO.Glob.CustomersAndAgents.Glob_OurCompanyProfile.Get_Select_Row_OurCompanyProfile(); Edit_Btn.Show(); Cancel_Edit_btn.Show(); Main_Info_Panel.Enabled = false; Panel_info_Extra.Show(); // CompanyName_Txt.Text = rr.COMPANY_NAME; Owner_NAME_Txt.Text = rr.OWNER_NAME; Address_Txt.Text = rr.ADDRESS; Company_Mobile_Txt.Text = rr.COMPANY_MOBILE_NO; Extra_Mobile_Txt.Text = rr.EXTRA_MOBILE_NO; Owner_Mobile_Txt.Text = rr.OWNER_MOBILE_NO; EmailTxt.Text = rr.EMAIL; Extra_Email_Txt.Text = rr.EXTRA_EMAIL; Extra_Details_Txt.Text = rr.EXTRA_DETAILS; Company_From_Date_link.Text = rr.LAST_CHANGE_DATE.ToLongDateString(); if (rr.IMAGE != null) { ImageR.Image = WARPRO.Glob.CacheData.Glob_Veriables.GetImageFromByteArray(rr.IMAGE); } }
public CustomerUI(long CustomerID) { try { InitializeComponent(); var c = Glob.CustomersAndAgents.CustomersAndAgents_class.Select_Row_Customer(CustomerID); var p = Glob.CustomersAndAgents.Glob_Passport.Get_Select_Row_Passport(CustomerID); OrignalCustomerIDForUpdateUse = c.ID; //for First Name string[] s = c.FIRST_NAME.Split('.'); MrCombo.Text = s[0]; FirstName_Txt.Text = s[1]; LAST_NAMETxt.Text = c.LAST_NAME; Address_Txt.Text = c.ADDRESS; Mobile1_Txt.Text = c.MOBILE_NO; EmailTxt.Text = c.EMAIL; Details_Txt.Text = c.DETAILS; Customer_From_Date_link.Text = c.CUSTOMER_FROM.ToLongDateString(); ImageR.Image = Glob.CacheData.Glob_Veriables.GetImageFromByteArray(c.PICTURE); passportNo_Txt.Text = c.PASSPORT_NO; IsRefferedByCheckBox.Checked = c.IsREFFERED; AgentID_Txt.Text = c.REFFERED_BY.ToString(); if (c.IsREFFERED == true) { AgentID_Txt.Show(); } SrNoTxt.Text = p.SR_NO; Date.Value = p.DATE; NameTxt.Text = p.NAME; passportNo_Txt.Text = p.PASSPORT_NO; cnicTxt.Text = p.CNIC_NO; DateOfBirthDatetime.Value = p.DATE_OF_BIRTH; DateOfIssueDatetime.Value = p.DATE_OF_ISSUE; DateOfExpiryDatetime.Value = p.DATE_OF_EXPIRY; cnicTxt.Text = cnicTxt.Text; Mobile1_Txt.Text = p.CONTACT_NO_1; MobileNo2Txt.Text = p.CONTACT_NO_2; webcam = new WebCam(); webcam.InitializeWebCam(ref ImageR); Panel_info_Extra.Show(); // Availibility_Toggle.Show(); Panel_pictureControls.Hide(); Edit_Btn.Show(); Cancel_Edit_btn.Show(); Main_Info_Panel.Enabled = false; SAVE_New_Customer_Btn.Hide(); ImageR.Region = Glob.CacheData.Glob_Veriables.GetRoundRegion(ImageR.Width, ImageR.Height); this.Text = "CUSTOMER " + c.FIRST_NAME.ToUpper() + " ID# " + c.ID.ToString(); } catch (Exception ex) { this.Close(); } }