/*******************************************************************************************************************************************************************************
        ****************************************************              Get Data And Replace To Form Function                 ********************************************************
        ****************************************************                                                                    ********************************************************
        *******************************************************************************************************************************************************************************/

        private void _GetAgent(Agents cag)
        {
            Agent_fname_TBx.Text             = cag.Agent_Fname;
            Agent_lname_TBx.Text             = cag.Agent_Lname;
            Agent_idcard_TBx.Text            = cag.Agent_Idcard;
            Agent_address_no_TBx.Text        = cag.Agent_Address_no;
            Agent_vilage_TBx.Text            = string.IsNullOrEmpty(cag.Agent_Vilage) ? "" : cag.Agent_Vilage.IndexOf('.') >= 1 ? cag.Agent_Vilage.Split('.')[1] : "";
            Agent_vilage_no_TBx.Text         = string.IsNullOrEmpty(cag.Agent_Vilage_no) ? "" : cag.Agent_Vilage_no.IndexOf('.') >= 1 ? cag.Agent_Vilage_no.Split('.')[1] : "";
            Agent_alley_TBx.Text             = string.IsNullOrEmpty(cag.Agent_Alley) ? "" : cag.Agent_Alley.IndexOf('.') >= 1 ? cag.Agent_Alley.Split('.')[1] : "";
            Agent_road_TBx.Text              = string.IsNullOrEmpty(cag.Agent_Road) ? "" : cag.Agent_Road.IndexOf('.') >= 1 ? cag.Agent_Road.Split('.')[1] : "";
            Agent_subdistrict_TBx.Text       = string.IsNullOrEmpty(cag.Agent_Subdistrict) ? "" : cag.Agent_Subdistrict.IndexOf('.') >= 1 ? cag.Agent_Subdistrict.Split('.')[1] : "";
            Agent_district_TBx.Text          = string.IsNullOrEmpty(cag.Agent_District) ? "" : cag.Agent_District.IndexOf('.') >= 1 ? cag.Agent_District.Split('.')[1] : "";
            Agent_province_DDL.SelectedValue = string.IsNullOrEmpty(cag.Agent_Province) ? "0" : cag.Agent_Province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(cag.Agent_Province.Split('.')[1]) : "0";
            Agent_country_TBx.Text           = cag.Agent_Country;
            Agent_zipcode_TBx.Text           = cag.Agent_Zipcode;
            Agent_status_DDL.SelectedValue   = cag.Agent_Status.ToString();
        }
示例#2
0
        private void _loadLeasingCod(Base_Leasing_Code bs_lscd)
        {
            Leasing_code_name_TBx.Text        = bs_lscd.Leasing_code_name;
            Leasing_code_S_Name_TBx.Text      = bs_lscd.Leasing_code_S_Name;
            Leasing_code_F_name_TBx.Text      = bs_lscd.Leasing_code_F_Name;
            Leasing_code_tax_id_TBx.Text      = bs_lscd.Leasing_code_Tax_id;
            Leasing_code_tax_subcode_TBx.Text = bs_lscd.Leasing_code_Tax_subcode;

            Leasing_code_address_no_TBx.Text        = bs_lscd.Leasing_code_address_no;
            Leasing_code_vilage_TBx.Text            = bs_lscd.Leasing_code_vilage.IndexOf('.') >= 1 ? bs_lscd.Leasing_code_vilage.Split('.')[1] : "";
            Leasing_code_vilage_no_TBx.Text         = bs_lscd.Leasing_code_vilage_no.IndexOf('.') >= 1 ? bs_lscd.Leasing_code_vilage_no.Split('.')[1] : "";
            Leasing_code_alley_TBx.Text             = bs_lscd.Leasing_code_alley.IndexOf('.') >= 1 ? bs_lscd.Leasing_code_alley.Split('.')[1] : "";
            Leasing_code_road_TBx.Text              = bs_lscd.Leasing_code_road.IndexOf('.') >= 1 ? bs_lscd.Leasing_code_road.Split('.')[1] : "";
            Leasing_code_subdistrict_TBx.Text       = bs_lscd.Leasing_code_subdistrict.IndexOf('.') >= 1 ? bs_lscd.Leasing_code_subdistrict.Split('.')[1] : "";
            Leasing_code_district_TBx.Text          = bs_lscd.Leasing_code_district.IndexOf('.') >= 1 ? bs_lscd.Leasing_code_district.Split('.')[1] : "";
            Leasing_code_province_DDL.SelectedValue = bs_lscd.Leasing_code_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(bs_lscd.Leasing_code_province.Split('.')[1]) : "";
            Leasing_code_contry_TBx.Text            = bs_lscd.Leasing_code_country;
            Leasing_code_zipcode_TBx.Text           = bs_lscd.Leasing_code_zipcode;
            Leasing_code_tel_TBx.Text = bs_lscd.Leasing_code_tel;
        }
        protected void Cust_status_DDL_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Cust_status_DDL.SelectedIndex == 2 || Cust_status_DDL.SelectedIndex == 3)
            {
                Marry_Panel.Visible = true;

                Customers ctm = (Customers)Session["Customer"];

                Marry_idcard_TBx.Text = ctm.Cust_Marry_idcard;
                Marry_Fname_TBx.Text  = ctm.Cust_Marry_Fname;
                Marry_Lname_TBx.Text  = ctm.Cust_Marry_Lname;
                Marry_Nationality_DDL.SelectedValue = ctm.ctm_marry_ntnlt.Nationality_id.ToString();
                Marry_Origin_DDL.SelectedValue      = ctm.ctm_marry_org.Origin_id.ToString();
                Marry_address_no_TBx.Text           = ctm.Cust_Marry_Address_no;
                Marry_vilage_TBx.Text            = string.IsNullOrEmpty(ctm.Cust_Marry_vilage) ? "" : ctm.Cust_Marry_vilage.IndexOf('.') >= 1 ? ctm.Cust_Marry_vilage.Split('.')[1] : "";
                Marry_vilage_no_TBx.Text         = string.IsNullOrEmpty(ctm.Cust_Marry_vilage_no) ? "" : ctm.Cust_Marry_vilage_no.IndexOf('.') >= 1 ? ctm.Cust_Marry_vilage_no.Split('.')[1] : "";
                Marry_alley_TBx.Text             = string.IsNullOrEmpty(ctm.Cust_Marry_alley) ? "" : ctm.Cust_Marry_alley.IndexOf('.') >= 1 ? ctm.Cust_Marry_alley.Split('.')[1] : "";
                Marry_road_TBx.Text              = string.IsNullOrEmpty(ctm.Cust_Marry_road) ? "" : ctm.Cust_Marry_road.IndexOf('.') >= 1 ? ctm.Cust_Marry_road.Split('.')[1] : "";
                Marry_subdistrict_TBx.Text       = string.IsNullOrEmpty(ctm.Cust_Marry_subdistrict) ? "" : ctm.Cust_Marry_subdistrict.IndexOf('.') >= 1 ? ctm.Cust_Marry_subdistrict.Split('.')[1] : "";
                Marry_district_TBx.Text          = string.IsNullOrEmpty(ctm.Cust_Marry_district) ? "" : ctm.Cust_Marry_district.IndexOf('.') >= 1 ? ctm.Cust_Marry_district.Split('.')[1] : "";
                Marry_province_DDL.SelectedValue = string.IsNullOrEmpty(ctm.Cust_Marry_province) ? "0" : ctm.Cust_Marry_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(ctm.Cust_Marry_province.Split('.')[1]) : "0";
                Marry_country_TBx.Text           = ctm.Cust_Marry_country;
                Marry_zipcode_TBx.Text           = ctm.Cust_Marry_zipcode;

                Marry_job_TBx.Text                   = ctm.Cust_Marry_job;
                Marry_job_position_TBx.Text          = ctm.Cust_Marry_job_position;
                Marry_job_long_TBx.Text              = ctm.Cust_Marry_job_long.ToString();
                Marry_job_salary_TBx.Text            = ctm.Cust_Marry_job_salary.ToString();
                Marry_job_local_name_TBx.Text        = ctm.Cust_Marry_job_local_name;
                Marry_job_address_no_TBx.Text        = ctm.Cust_Marry_job_address_no;
                Marry_job_vilage_TBx.Text            = string.IsNullOrEmpty(ctm.Cust_Marry_job_vilage) ? "" : ctm.Cust_Marry_job_vilage.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_vilage.Split('.')[1] : "";
                Marry_job_vilage_no_TBx.Text         = string.IsNullOrEmpty(ctm.Cust_Marry_job_vilage_no) ? "" : ctm.Cust_Marry_job_vilage_no.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_vilage_no.Split('.')[1] : "";
                Marry_job_alley_TBx.Text             = string.IsNullOrEmpty(ctm.Cust_Marry_job_alley) ? "" : ctm.Cust_Marry_job_alley.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_alley.Split('.')[1] : "";
                Marry_job_road_TBx.Text              = string.IsNullOrEmpty(ctm.Cust_Marry_job_road) ? "" : ctm.Cust_Marry_job_road.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_road.Split('.')[1] : "";
                Marry_job_subdistrict_TBx.Text       = string.IsNullOrEmpty(ctm.Cust_Marry_job_subdistrict) ? "" : ctm.Cust_Marry_job_subdistrict.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_subdistrict.Split('.')[1] : "";
                Marry_job_district_TBx.Text          = string.IsNullOrEmpty(ctm.Cust_Marry_job_district) ? "" : ctm.Cust_Marry_job_district.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_district.Split('.')[1] : "";
                Marry_job_province_DDL.SelectedValue = string.IsNullOrEmpty(ctm.Cust_Marry_job_province) ? "0" : ctm.Cust_Marry_job_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(ctm.Cust_Marry_job_province.Split('.')[1]) : "0";
                Marry_job_country_TBx.Text           = ctm.Cust_Marry_job_country;
                Marry_job_zipcode_TBx.Text           = ctm.Cust_Marry_job_zipcode;
                Marry_job_tel_TBx.Text               = ctm.Cust_Marry_job_tel;
                Marry_tel_TBx.Text                   = ctm.Cust_Marry_tel;
                Marry_email_TBx.Text                 = ctm.Cust_Marry_email;
            }
            else
            {
                Marry_Panel.Visible = false;
            }
        }
        /*******************************************************************************************************************************************************************************
        ****************************************************              Get Data And Replace To Form Function                 ********************************************************
        ****************************************************                                                                    ********************************************************
        *******************************************************************************************************************************************************************************/

        private void _GetCustomer(Customers ctm)
        {
            Cust_idcard_TBx.Text               = ctm.Cust_Idcard;
            Cust_Fname_TBx.Text                = ctm.Cust_Fname;
            Cust_LName_TBx.Text                = ctm.Cust_LName;
            Cust_B_date_TBx.Text               = string.IsNullOrEmpty(ctm.Cust_B_date)? "" : DateTimeUtility.convertDateToPageRealServer(ctm.Cust_B_date.Split(' ')[0]);
            Cust_Idcard_without_TBx.Text       = ctm.Cust_Idcard_without;
            Cust_Idcard_start_TBx.Text         = string.IsNullOrEmpty(ctm.Cust_Idcard_start) ? "" : DateTimeUtility.convertDateToPageRealServer(ctm.Cust_Idcard_start.Split(' ')[0]);
            Cust_Idcard_expire_TBx.Text        = string.IsNullOrEmpty(ctm.Cust_Idcard_expire) ? "" : DateTimeUtility.convertDateToPageRealServer(ctm.Cust_Idcard_expire.Split(' ')[0]);
            Cust_Nationality_DDL.SelectedValue = ctm.ctm_ntnlt.Nationality_id.ToString();
            Cust_Origin_DDL.SelectedValue      = ctm.ctm_org.Origin_id.ToString();
            Cust_Tel_TBx.Text                   = ctm.Cust_Tel;
            Cust_Email_TBx.Text                 = ctm.Cust_Email;
            Cust_job_TBx.Text                   = ctm.Cust_Job;
            Cust_job_position_TBx.Text          = ctm.Cust_Job_position;
            Cust_job_long_TBx.Text              = ctm.Cust_Job_long.ToString();
            Cust_job_local_name_TBx.Text        = ctm.Cust_Job_local_name;
            Cust_job_address_no_TBx.Text        = ctm.Cust_Job_address_no;
            Cust_job_vilage_TBx.Text            = ctm.Cust_Job_vilage.IndexOf('.') >= 1 ? ctm.Cust_Job_vilage.Split('.')[1] : "";
            Cust_job_vilage_no_TBx.Text         = ctm.Cust_Job_vilage_no.IndexOf('.') >= 1 ? ctm.Cust_Job_vilage_no.Split('.')[1] : "";
            Cust_job_alley_TBx.Text             = ctm.Cust_Job_alley.IndexOf('.') >= 1 ? ctm.Cust_Job_alley.Split('.')[1] : "";
            Cust_job_road_TBx.Text              = ctm.Cust_Job_road.IndexOf('.') >= 1 ? ctm.Cust_Job_road.Split('.')[1] : "";
            Cust_job_subdistrict_TBx.Text       = ctm.Cust_Job_subdistrict.IndexOf('.') >= 1 ? ctm.Cust_Job_subdistrict.Split('.')[1] : "";
            Cust_job_district_TBx.Text          = ctm.Cust_Job_district.IndexOf('.') >= 1 ? ctm.Cust_Job_district.Split('.')[1] : "";
            Cust_job_province_DDL.SelectedValue = string.IsNullOrEmpty(ctm.Cust_Job_province) ? "0" : ctm.Cust_Job_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(ctm.Cust_Job_province.Split('.')[1]) : "0";
            Cust_job_contry_TBx.Text            = ctm.Cust_Job_country;
            Cust_job_zipcode_TBx.Text           = ctm.Cust_Job_zipcode;
            Cust_job_tel_TBx.Text               = ctm.Cust_Job_tel;
            Cust_job_email_TBx.Text             = ctm.Cust_Job_email;
            Cust_job_salary_TBx.Text            = ctm.Cust_Job_salary.ToString();
            Cust_status_DDL.SelectedValue       = ctm.ctm_pstt.person_status_id.ToString();

            if (ctm.ctm_pstt.person_status_id == 2 || ctm.ctm_pstt.person_status_id == 3)
            {
                Marry_Panel.Visible = true;

                Marry_idcard_TBx.Text = ctm.Cust_Marry_idcard;
                Marry_Fname_TBx.Text  = ctm.Cust_Marry_Fname;
                Marry_Lname_TBx.Text  = ctm.Cust_Marry_Lname;
                Marry_Nationality_DDL.SelectedValue = ctm.ctm_marry_ntnlt.Nationality_id.ToString();
                Marry_Origin_DDL.SelectedValue      = ctm.ctm_marry_org.Origin_id.ToString();
                Marry_address_no_TBx.Text           = ctm.Cust_Marry_Address_no;
                Marry_vilage_TBx.Text            = string.IsNullOrEmpty(ctm.Cust_Marry_vilage) ? "" : ctm.Cust_Marry_vilage.IndexOf('.') >= 1 ? ctm.Cust_Marry_vilage.Split('.')[1] : "";
                Marry_vilage_no_TBx.Text         = string.IsNullOrEmpty(ctm.Cust_Marry_vilage_no) ? "" : ctm.Cust_Marry_vilage_no.IndexOf('.') >= 1 ? ctm.Cust_Marry_vilage_no.Split('.')[1] : "";
                Marry_alley_TBx.Text             = string.IsNullOrEmpty(ctm.Cust_Marry_alley) ? "" : ctm.Cust_Marry_alley.IndexOf('.') >= 1 ? ctm.Cust_Marry_alley.Split('.')[1] : "";
                Marry_road_TBx.Text              = string.IsNullOrEmpty(ctm.Cust_Marry_road) ? "" : ctm.Cust_Marry_road.IndexOf('.') >= 1 ? ctm.Cust_Marry_road.Split('.')[1] : "";
                Marry_subdistrict_TBx.Text       = string.IsNullOrEmpty(ctm.Cust_Marry_subdistrict) ? "" : ctm.Cust_Marry_subdistrict.IndexOf('.') >= 1 ? ctm.Cust_Marry_subdistrict.Split('.')[1] : "";
                Marry_district_TBx.Text          = string.IsNullOrEmpty(ctm.Cust_Marry_district) ? "" : ctm.Cust_Marry_district.IndexOf('.') >= 1 ? ctm.Cust_Marry_district.Split('.')[1] : "";
                Marry_province_DDL.SelectedValue = string.IsNullOrEmpty(ctm.Cust_Marry_province) ? "0" : ctm.Cust_Marry_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(ctm.Cust_Marry_province.Split('.')[1]) : "0";
                Marry_country_TBx.Text           = ctm.Cust_Marry_country;
                Marry_zipcode_TBx.Text           = ctm.Cust_Marry_zipcode;
                Marry_job_TBx.Text                   = ctm.Cust_Marry_job;
                Marry_job_position_TBx.Text          = ctm.Cust_Marry_job_position;
                Marry_job_long_TBx.Text              = ctm.Cust_Marry_job_long.ToString();
                Marry_job_salary_TBx.Text            = ctm.Cust_Marry_job_salary.ToString();
                Marry_job_local_name_TBx.Text        = ctm.Cust_Marry_job_local_name;
                Marry_job_address_no_TBx.Text        = ctm.Cust_Marry_job_address_no;
                Marry_job_vilage_TBx.Text            = string.IsNullOrEmpty(ctm.Cust_Marry_job_vilage) ? "" : ctm.Cust_Marry_job_vilage.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_vilage.Split('.')[1] : "";
                Marry_job_vilage_no_TBx.Text         = string.IsNullOrEmpty(ctm.Cust_Marry_job_vilage_no) ? "" : ctm.Cust_Marry_job_vilage_no.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_vilage_no.Split('.')[1] : "";
                Marry_job_alley_TBx.Text             = string.IsNullOrEmpty(ctm.Cust_Marry_job_alley) ? "" : ctm.Cust_Marry_job_alley.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_alley.Split('.')[1] : "";
                Marry_job_road_TBx.Text              = string.IsNullOrEmpty(ctm.Cust_Marry_job_road) ? "" : ctm.Cust_Marry_job_road.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_road.Split('.')[1] : "";
                Marry_job_subdistrict_TBx.Text       = string.IsNullOrEmpty(ctm.Cust_Marry_job_subdistrict) ? "" : ctm.Cust_Marry_job_subdistrict.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_subdistrict.Split('.')[1] : "";
                Marry_job_district_TBx.Text          = string.IsNullOrEmpty(ctm.Cust_Marry_job_district) ? "" : ctm.Cust_Marry_job_district.IndexOf('.') >= 1 ? ctm.Cust_Marry_job_district.Split('.')[1] : "";
                Marry_job_province_DDL.SelectedValue = string.IsNullOrEmpty(ctm.Cust_Marry_job_province) ? "0" : ctm.Cust_Marry_job_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(ctm.Cust_Marry_job_province.Split('.')[1]) : "0";
                Marry_job_country_TBx.Text           = ctm.Cust_Marry_job_country;
                Marry_job_zipcode_TBx.Text           = ctm.Cust_Marry_job_zipcode;
                Marry_job_tel_TBx.Text               = ctm.Cust_Marry_job_tel;
                Marry_tel_TBx.Text                   = ctm.Cust_Marry_tel;
                Marry_email_TBx.Text                 = ctm.Cust_Marry_email;
            }

            // ที่อยู่ตามทะเบียนบ้าน
            Home_Cust_Address_no_TBx.Text        = ctm.Cust_Home_address_no;
            Home_Cust_Vilage_TBx.Text            = ctm.Cust_Home_vilage.IndexOf('.') >= 1 ? ctm.Cust_Home_vilage.Split('.')[1] : "";
            Home_Cust_Vilage_no_TBx.Text         = ctm.Cust_Home_vilage_no.IndexOf('.') >= 1 ? ctm.Cust_Home_vilage_no.Split('.')[1] : "";
            Home_Cust_Alley_TBx.Text             = ctm.Cust_Home_alley.IndexOf('.') >= 1 ? ctm.Cust_Home_alley.Split('.')[1] : "";
            Home_Cust_Road_TBx.Text              = ctm.Cust_Home_road.IndexOf('.') >= 1 ? ctm.Cust_Home_road.Split('.')[1] : "";
            Home_Cust_Subdistrict_TBx.Text       = ctm.Cust_Home_subdistrict.IndexOf('.') >= 1 ? ctm.Cust_Home_subdistrict.Split('.')[1] : "";
            Home_Cust_District_TBx.Text          = ctm.Cust_Home_district.IndexOf('.') >= 1 ? ctm.Cust_Home_district.Split('.')[1] : "";
            Home_Cust_Province_DDL.SelectedValue = string.IsNullOrEmpty(ctm.Cust_Home_province) ? "0" : ctm.Cust_Home_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(ctm.Cust_Home_province.Split('.')[1]) : "0";
            Home_Cust_Country_TBx.Text           = ctm.Cust_Home_country;
            Home_Cust_Zipcode_TBx.Text           = ctm.Cust_Home_zipcode;
            Home_Cust_Tel_TBx.Text = ctm.Cust_Home_tel;
            Home_Cust_Home_status_id_DDL.SelectedValue = ctm.ctm_home_stt.Home_status_id.ToString();
            Home_Cust_Gps_Latitude_TBx.Text            = ctm.Cust_Home_GPS_Latitude;
            Home_Cust_Gps_Longitude_TBx.Text           = ctm.Cust_Home_GPS_Longitude;

            // ที่อยู่ตามบัตรประชาชน
            Idcard_Cust_Address_no_TBx.Text        = ctm.Cust_Idcard_address_no;
            Idcard_Cust_Vilage_TBx.Text            = ctm.Cust_Idcard_vilage.IndexOf('.') >= 1 ? ctm.Cust_Idcard_vilage.Split('.')[1] : "";
            Idcard_Cust_Vilage_no_TBx.Text         = ctm.Cust_Idcard_vilage_no.IndexOf('.') >= 1 ? ctm.Cust_Idcard_vilage_no.Split('.')[1] : "";
            Idcard_Cust_Alley_TBx.Text             = ctm.Cust_Idcard_alley.IndexOf('.') >= 1 ? ctm.Cust_Idcard_alley.Split('.')[1] : "";
            Idcard_Cust_Road_TBx.Text              = ctm.Cust_Idcard_road.IndexOf('.') >= 1 ? ctm.Cust_Idcard_road.Split('.')[1] : "";
            Idcard_Cust_Subdistrict_TBx.Text       = ctm.Cust_Idcard_subdistrict.IndexOf('.') >= 1 ? ctm.Cust_Idcard_subdistrict.Split('.')[1] : "";
            Idcard_Cust_District_TBx.Text          = ctm.Cust_Idcard_district.IndexOf('.') >= 1 ? ctm.Cust_Idcard_district.Split('.')[1] : "";
            Idcard_Cust_Province_DDL.SelectedValue = string.IsNullOrEmpty(ctm.Cust_Idcard_province) ? "0" : ctm.Cust_Idcard_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(ctm.Cust_Idcard_province.Split('.')[1]) : "0";
            Idcard_Cust_Country_TBx.Text           = ctm.Cust_Idcard_country;
            Idcard_Cust_Zipcode_TBx.Text           = ctm.Cust_Idcard_zipcode;
            Idcard_Cust_Tel_TBx.Text = ctm.Cust_Idcard_tel;
            Idcard_Cust_Home_status_DDL.SelectedValue = ctm.ctm_idcard_stt.Home_status_id.ToString();

            // ที่อยู่ปัจจุบัน
            Current_Cust_Address_no_TBx.Text        = ctm.Cust_Current_address_no;
            Current_Cust_Vilage_TBx.Text            = ctm.Cust_Current_vilage.IndexOf('.') >= 1 ? ctm.Cust_Current_vilage.Split('.')[1] : "";
            Current_Cust_Vilage_no_TBx.Text         = ctm.Cust_Current_vilage_no.IndexOf('.') >= 1 ? ctm.Cust_Current_vilage_no.Split('.')[1] : "";
            Current_Cust_Road_TBx.Text              = ctm.Cust_Current_road.IndexOf('.') >= 1 ? ctm.Cust_Current_road.Split('.')[1] : "";
            Current_Cust_Subdistrict_TBx.Text       = ctm.Cust_Current_subdistrict.IndexOf('.') >= 1 ? ctm.Cust_Current_subdistrict.Split('.')[1] : "";
            Current_Cust_District_TBx.Text          = ctm.Cust_Current_district.IndexOf('.') >= 1 ? ctm.Cust_Current_district.Split('.')[1] : "";
            Current_Cust_Province_DDL.SelectedValue = string.IsNullOrEmpty(ctm.Cust_Current_province) ? "0" : ctm.Cust_Current_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(ctm.Cust_Current_province.Split('.')[1]) : "0";
            Current_Cust_Country_TBx.Text           = ctm.Cust_Current_country;
            Current_Cust_Zipcode_TBx.Text           = ctm.Cust_Current_zipcode;
            Current_Cust_Tel_TBx.Text = ctm.Cust_Current_tel;
            Current_Cust_Home_status_id_DDL.SelectedValue = ctm.ctm_current_stt.Home_status_id.ToString();
        }
        /*******************************************************************************************************************************************************************************
        ****************************************************              Get Data And Replace To Form Function                 ********************************************************
        ****************************************************                                                                    ********************************************************
        *******************************************************************************************************************************************************************************/

        private void _GetLeasing(string Leasing_id)
        {
            Car_Leasings_Manager cls_mng = new Car_Leasings_Manager();

            Car_Leasings cls_tmp = cls_mng.getCarLeasingById(Leasing_id);

            Deps_No_TBx.Text                = cls_tmp.Deps_no;
            Leasing_No_TBx.Text             = cls_tmp.Leasing_no;
            Leasing_Code_DDL.SelectedValue  = cls_tmp.bs_ls_code.Leasing_code_id.ToString();
            Leasing_Date_TBx.Text           = DateTimeUtility.convertDateToPageRealServer(cls_tmp.Leasing_date);
            Company_DDL.SelectedValue       = cls_tmp.bs_cpn.Company_id.ToString();
            Zone_DDL.SelectedValue          = cls_tmp.bs_zn.Zone_id.ToString();
            Court_DDL.SelectedValue         = cls_tmp.bs_ct.Court_id.ToString();
            Person_Receive_Trasfer_TBx.Text = cls_tmp.PeReT;

            TotalPaymentTime_DDL.SelectedValue = cls_tmp.TotalPaymentTime.ToString();
            Total_Require_TBx.Text             = cls_tmp.Total_require.ToString();
            Interest_Rate_TBx.Text             = cls_tmp.Interest_rate.ToString();
            Total_Period_TBx.Text      = cls_tmp.Total_period.ToString();
            Total_Sum_TBx.Text         = cls_tmp.Total_sum.ToString("#,##0.00");
            Total_Interest_TBx.Text    = cls_tmp.Total_Interest.ToString("#,##0.00");
            Total_Tax_TBx.Text         = cls_tmp.Total_Tax.ToString("#,##0.00");
            Total_Leasing_TBx.Text     = cls_tmp.Total_leasing.ToString("#,##0.00");
            Total_Net_Leasing_TBx.Text = cls_tmp.Total_Net_leasing.ToString("#,##0.00");
            Period_Cal_TBx.Text        = cls_tmp.Period_cal.ToString("#,##0.00");
            Period_interst_TBx.Text    = cls_tmp.Period_interst.ToString("#,##0.00");
            Period_tax_TBx.Text        = cls_tmp.Period_tax.ToString("#,##0.00");
            Period_pure_TBx.Text       = cls_tmp.Period_pure.ToString("#,##0.00");
            Period_Payment_TBx.Text    = cls_tmp.Period_payment.ToString("#,##0.00");
            Period_require_TBx.Text    = cls_tmp.Period_require.ToString("#,##0.00");

            Payment_Schedule_DDL.SelectedValue = cls_tmp.Payment_schedule.ToString();
            First_Payment_Date_TBx.Text        = DateTimeUtility.convertDateToPageRealServer(cls_tmp.First_payment_date);

            // ข้อมูลรถ
            Car_Register_Date_TBx.Text           = string.IsNullOrEmpty(cls_tmp.Car_register_date) ? "" : DateTimeUtility.convertDateToPageRealServer(cls_tmp.Car_register_date);
            Car_Plate_TBx.Text                   = cls_tmp.Car_license_plate;
            Car_Plate_Province_DDL.SelectedValue = cls_tmp.Car_license_plate_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(cls_tmp.Car_license_plate_province.Split('.')[1]) : "0";
            Car_Type_TBx.Text               = cls_tmp.Car_type;
            Car_Feature_TBx.Text            = cls_tmp.Car_feature;
            Car_Brand_DDL.SelectedValue     = cls_tmp.bs_cbrn.car_brand_id.ToString();
            Car_Model_TBx.Text              = cls_tmp.Car_model;
            Car_Year_DDL.SelectedValue      = cls_tmp.Car_year;
            Car_Color_TBx.Text              = cls_tmp.Car_color;
            Engine_No_TBx.Text              = cls_tmp.Car_engine_no;
            Engine_No_At_TBx.Text           = cls_tmp.Car_engine_no_at;
            Engine_Brand_TBx.Text           = cls_tmp.Car_engine_brand;
            Chassis_No_TBx.Text             = cls_tmp.Car_chassis_no;
            Chassis_No_At_TBx.Text          = cls_tmp.Car_chassis_no_at;
            Car_Fuel_Type_TBx.Text          = cls_tmp.Car_fual_type;
            Car_Gas_No_TBx.Text             = cls_tmp.Car_gas_No;
            Car_Used_DDL.SelectedValue      = cls_tmp.Car_used_id.ToString();
            Car_Distance_TBx.Text           = cls_tmp.Car_distance.ToString();
            Car_Next_Register_Date_TBx.Text = string.IsNullOrEmpty(cls_tmp.Car_next_register_date) ? "" : DateTimeUtility.convertDateToPageRealServer(cls_tmp.Car_next_register_date);
            Car_Tax_Value_TBx.Text          = cls_tmp.Car_tax_value.ToString();
            Car_Credits_TBx.Text            = cls_tmp.Car_credits;
            Car_agent_TBx.Text              = cls_tmp.Car_agent;

            Car_Old_Owner_TBx.Text                   = cls_tmp.Car_old_owner;
            Car_Old_Owner_Idcard_TBx.Text            = cls_tmp.Car_old_owner_idcard;
            Car_old_owner_b_date_TBx.Text            = string.IsNullOrEmpty(cls_tmp.Car_old_owner_b_date) ? "" : DateTimeUtility.convertDateToPageRealServer(cls_tmp.Car_old_owner_b_date);
            Car_Old_Owner_Address_No_TBx.Text        = cls_tmp.Car_old_owner_address_no;
            Car_Old_Owner_Vilage_TBx.Text            = cls_tmp.Car_old_owner_vilage.IndexOf('.') >= 1 ? cls_tmp.Car_old_owner_vilage.Split('.')[1] : "";
            Car_Old_Owner_Vilage_No_TBx.Text         = cls_tmp.Car_old_owner_vilage_no.IndexOf('.') >= 1 ? cls_tmp.Car_old_owner_vilage_no.Split('.')[1] : "";
            Car_Old_Owner_alley_TBx.Text             = cls_tmp.Car_old_owner_alley.IndexOf('.') >= 1 ? cls_tmp.Car_old_owner_alley.Split('.')[1] : "";
            Car_Old_Owner_Road_TBx.Text              = cls_tmp.Car_old_owner_road.IndexOf('.') >= 1 ? cls_tmp.Car_old_owner_road.Split('.')[1] : "";
            Car_Old_Owner_Subdistrict_TBx.Text       = cls_tmp.Car_old_owner_subdistrict.IndexOf('.') >= 1 ? cls_tmp.Car_old_owner_subdistrict.Split('.')[1] : "";
            Car_Old_Owner_District_TBx.Text          = cls_tmp.Car_old_owner_district.IndexOf('.') >= 1 ? cls_tmp.Car_old_owner_district.Split('.')[1] : "";
            Car_Old_Owner_Province_DDL.SelectedValue = cls_tmp.Car_old_owner_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(cls_tmp.Car_old_owner_province.Split('.')[1]) : "0";
            Car_Old_Owner_Contry_TBx.Text            = cls_tmp.Car_old_owner_contry;
            Car_Old_Owner_Zipcode_TBx.Text           = cls_tmp.Car_old_owner_zipcode;

            Tent_car_DDL.SelectedValue   = cls_tmp.tent_car.Tent_car_id.ToString();
            Cheque_receiver_TBx.Text     = cls_tmp.Cheque_receiver;
            Cheque_bank_TBx.Text         = cls_tmp.Cheque_bank;
            Cheque_bank_branch_TBx.Text  = cls_tmp.Cheque_bank_branch;
            Cheque_number_TBx.Text       = cls_tmp.Cheque_number;
            Cheque_sum_TBx.Text          = cls_tmp.Cheque_sum.ToString();
            Cheque_receive_date_TBx.Text = string.IsNullOrEmpty(cls_tmp.Cheque_receive_date) ? "" : DateTimeUtility.convertDateToPageRealServer(cls_tmp.Cheque_receive_date);

            Leasing_Comment_TBx.Text = cls_tmp.Leasing_Comment;

            _CheckLeasingPayment(Leasing_id);
        }
示例#6
0
        private void _loadCompany(Base_Companys bs_cpn)
        {
            Company_code_TBx.Text        = bs_cpn.Company_code;
            Company_N_name_TBx.Text      = bs_cpn.Company_N_name;
            Company_F_name_TBx.Text      = bs_cpn.Company_F_name;
            Company_tax_id_TBx.Text      = bs_cpn.Company_tax_id;
            Company_tax_subcode_TBx.Text = bs_cpn.Company_tax_subcode;

            Company_address_no_TBx.Text        = bs_cpn.Company_address_no;
            Company_vilage_TBx.Text            = bs_cpn.Company_vilage.IndexOf('.') >= 1 ? bs_cpn.Company_vilage.Split('.')[1] : "";
            Company_vilage_no_TBx.Text         = bs_cpn.Company_vilage_no.IndexOf('.') >= 1 ? bs_cpn.Company_vilage_no.Split('.')[1] : "";
            Company_alley_TBx.Text             = bs_cpn.Company_alley.IndexOf('.') >= 1 ? bs_cpn.Company_alley.Split('.')[1] : "";
            Company_road_TBx.Text              = bs_cpn.Company_road.IndexOf('.') >= 1 ? bs_cpn.Company_road.Split('.')[1] : "";
            Company_subdistrict_TBx.Text       = bs_cpn.Company_subdistrict.IndexOf('.') >= 1 ? bs_cpn.Company_subdistrict.Split('.')[1] : "";
            Company_district_TBx.Text          = bs_cpn.Company_district.IndexOf('.') >= 1 ? bs_cpn.Company_district.Split('.')[1] : "";
            Company_province_DDL.SelectedValue = bs_cpn.Company_province.IndexOf('.') >= 1 ? Thai_Province._getThaiProvinces(bs_cpn.Company_province.Split('.')[1]) : "";
            Company_contry_TBx.Text            = bs_cpn.Company_country;
            Company_zipcode_TBx.Text           = bs_cpn.Company_zipcode;
            Company_tel_TBx.Text = bs_cpn.Company_tel;

            Package_TBx.Text = bs_cpn.Company_package;
        }