//private bool CheckInfo(int newCooperation)
        //{
        //    var codeOstad = Convert.ToInt32(Session["user"]);
        //    errorMsg = string.Empty;
        //    if (newCooperation != 2)
        //    {
        //        DataTable dtResult = ProfReqBuss.GetProfessorFromResearchByCode(codeOstad);
        //        if (dtResult.Rows.Count == 0)
        //        {
        //            var profReqs = ProfReqBuss.GetAllRequestsByProfCode(codeOstad);
        //            if (profReqs.Rows.Count > 0)
        //            {
        //                var prof = FRB.GetOstadInfoFromHR(codeOstad).Rows[FRB.GetOstadInfoFromHR(codeOstad).Rows.Count - 1];

        //                // Check Existing Requests
        //                var personalInfoRequested = profReqs.AsEnumerable().Where(w => w.Field<long>("RequestTypeID") == (int)RequestTypeId.EditPersonalInfo).Count() > 0;
        //                var contactInfoRequested = profReqs.AsEnumerable().Where(w => w.Field<long>("RequestTypeID") == (int)RequestTypeId.EditContactInfo).Count() > 0;
        //                var hokmRequested = profReqs.AsEnumerable().Where(w => w.Field<long>("RequestTypeID") == (int)RequestTypeId.EditHokm).Count() > 0;

        //                // Check Existing Documents
        //                var docs = ProfReqBuss.GetAllRequestDocsByProfCode(codeOstad);
        //                if (docs.Rows.Count > 0)
        //                {
        //                    if (personalInfoRequested)
        //                    {
        //                        if (
        //                            docs.AsEnumerable().Where(w => w.Field<int>("DocType") == (int)Hire.Hire.DocType.صفحه_اول_شناسنامه).Count() > 0
        //                            && docs.AsEnumerable().Where(w => w.Field<int>("DocType") == (int)Hire.Hire.DocType.اسکن_کارت_ملی).Count() > 0
        //                            && docs.AsEnumerable().Where(w => w.Field<int>("DocType") == (int)Hire.Hire.DocType.عکس_پرسنلی).Count() > 0
        //                            && docs.AsEnumerable().Where(w => w.Field<int>("DocType") == (int)Hire.Hire.DocType.آخرین_مدرک_تحصیلی).Count() > 0
        //                            )
        //                        {
        //                            if(Convert.ToInt32(prof["sex"]) == 1
        //                                && Convert.ToInt32(prof["status_nezam"]) != (int)Hire.Hire.militaryStatus.برگ_اعزام
        //                                && Convert.ToInt32(prof["status_nezam"]) != (int)Hire.Hire.militaryStatus.درحين_خدمت
        //                                && Convert.ToInt32(prof["status_nezam"]) != (int)Hire.Hire.militaryStatus.مشمول
        //                                && Convert.ToInt32(prof["status_nezam"]) != (int)Hire.Hire.militaryStatus.غير_مشمول
        //                                && docs.AsEnumerable().Where(w => w.Field<int>("DocType") == (int)Hire.Hire.DocType.اسکن_کارت_پایان_خدمت).Count() == 0
        //                                )
        //                                personalInfoRequested = false;
        //                            if(prof["BimehTypeId"] != null
        //                                || Convert.ToInt32(prof["BimehTypeId"]) == 0
        //                                || (Convert.ToInt32(prof["BimehTypeId"]) > 0
        //                                && docs.AsEnumerable().Where(w => w.Field<int>("DocType") == (int)Hire.Hire.DocType.اسکن_بیمه).Count() == 0))
        //                                personalInfoRequested = false;
        //                            if(Convert.ToInt32(prof["university"]) == 0
        //                                || (Convert.ToInt32(prof["university"]) > 0
        //                                && (Convert.ToInt32(prof["university"]) != 27 ) && Convert.ToInt32(prof["university"]) < 56
        //                                && docs.AsEnumerable().Where(w => w.Field<int>("DocType") == (int)Hire.Hire.DocType.ارزشنامه_تحصیلی_وزارت_علوم).Count() == 0))
        //                                personalInfoRequested = false;
        //                        }
        //                        else
        //                            personalInfoRequested = false;
        //                    }
        //                    if (hokmRequested)
        //                    {
        //                        if (prof["martabeh"] == null)
        //                            hokmRequested = false;
        //                        else if(Convert.ToInt32(prof["martabeh"]) > 0
        //                            && docs.AsEnumerable().Where(w => w.Field<int>("DocType") == (int)Hire.Hire.DocType.آخرین_حکم_کارگزینی).Count() == 0)
        //                            hokmRequested = false;
        //                        else if(prof["idmadrak"] == null)
        //                            hokmRequested = false;
        //                        else if (Convert.ToInt32(prof["idmadrak"]) == (int)Hire.Hire.MadrakType.دانشجوی_دکتری_بعد_امتحان_جامع
        //                            && docs.AsEnumerable().Where(w => w.Field<int>("DocType") == (int)Hire.Hire.DocType.گواهی_امتحان_جامع).Count() == 0)
        //                            hokmRequested = false;
        //                    }
        //                }
        //                else
        //                {
        //                    personalInfoRequested = false;
        //                    contactInfoRequested = false;
        //                    hokmRequested = false;
        //                }

        //                // Set Results
        //                if (!personalInfoRequested)
        //                    errorMsg += "اطلاعات فردی";
        //                if (!contactInfoRequested)
        //                {
        //                    errorMsg += errorMsg.Length > 0 ? "، " : "";
        //                    errorMsg += "اطلاعات تماس";
        //                }
        //                if (!hokmRequested)
        //                {
        //                    errorMsg += errorMsg.Length > 0 ? "، " : "";
        //                    errorMsg += "اطلاعات کارگزینی";
        //                }
        //            }
        //            else
        //                errorMsg = "اطلاعات فردی، اطلاعات تماس و اطلاعات کارگزینی";
        //        }
        //    }
        //    if (string.IsNullOrEmpty(errorMsg))
        //        return true;
        //    else
        //        return false;
        //}

        private bool CheckInfo(int newCooperation)
        {
            var personalInfoRequested = true;
            var hokmRequested         = true;
            var contactInfoRequested  = true;
            var codeOstad             = Convert.ToInt32(Session[sessionNames.userID_StudentOstad]);

            errorMsg = string.Empty;
            if (newCooperation != 2)
            {
                //var prof = ProfReqBuss.GetProfessorFromResearchByCode(codeOstad);
                var prof     = FRB.getOstadInf(codeOstad);
                var lastHokm = ProfReqBuss.GetLastHokmInfoByInfoPeopleID(Convert.ToInt32(Session["hrInfoPeopleId"]));
                lastHokm = new ProfessorHokmDTO();
                if (lastHokm.Code_Ostad == 0)
                {
                    var lastReqOfHokm = ProfReqBuss.GetRequestByTypeAndStatus("19", "6");
                    if (lastReqOfHokm != null)
                    {
                        if (lastReqOfHokm.Count > 0)
                        {
                            var aa = lastReqOfHokm.AsEnumerable().OrderByDescending(a => a.Id).Where(a => a.Code_Ostad == codeOstad).FirstOrDefault();
                            if (aa != null)
                            {
                                if (aa.Code_Ostad == codeOstad)
                                {
                                    int reqID = aa.Id;
                                    lastHokm = ProfReqBuss.GetNewHokmInfo(reqID);
                                }
                            }
                        }
                    }
                }
                //if (prof.Rows.Count > 0)
                if (lastHokm != null && lastHokm.Code_Ostad != 0)

                {
                    var infoId        = Convert.ToInt32(prof.hrId);
                    var shenasnameDoc = ProfReqBuss.GetDocByInfoIdAndType(infoId, (int)Hire.Hire.DocType.صفحه_اول_شناسنامه);
                    //var cardMeliDoc = ProfReqBuss.GetDocByInfoIdAndType(infoId, (int)Hire.Hire.DocType.اسکن_کارت_ملی);
                    //var personalPictureDoc = ProfReqBuss.GetDocByInfoIdAndType(infoId, (int)Hire.Hire.DocType.عکس_پرسنلی);
                    var madrakDoc = ProfReqBuss.GetDocByInfoIdAndType(infoId, (int)Hire.Hire.DocType.آخرین_مدرک_تحصیلی);

                    if (!string.IsNullOrEmpty(prof.idd) &&
                        !string.IsNullOrEmpty(prof.idd_Melli) &&
                        !string.IsNullOrEmpty(prof.salTavalod) &&
                        !string.IsNullOrEmpty(prof.fatherName) &&
                        !string.IsNullOrEmpty(prof.name) &&
                        !string.IsNullOrEmpty(prof.family) &&
                        prof.maghta > 0 &&
                        prof.reshte > 0 &&
                        !string.IsNullOrEmpty(prof.salMadrak) &&
                        prof.nameUniMadrak > 0 &&
                        prof.typeUniMadrak > 0 &&
                        !string.IsNullOrEmpty(prof.sanavat)
                        //&& !string.IsNullOrEmpty(prof.taahol)
                        && !string.IsNullOrEmpty(prof.siba) &&
                        madrakDoc.Rows.Count > 0 &&
                        shenasnameDoc.Rows.Count > 0
                        //&& cardMeliDoc.Rows.Count > 0
                        //&& personalPictureDoc.Rows.Count > 0
                        )
                    {
                        var nezamDoc = ProfReqBuss.GetDocByInfoIdAndType(infoId, (int)Hire.Hire.DocType.اسکن_کارت_پایان_خدمت);
                        if (((prof.sexIsMan
                              //&& !string.IsNullOrEmpty(prof.Rows[0]["status_nezam"].ToString())
                              && prof.nezam != (int)Hire.Hire.militaryStatus.درحين_خدمت &&
                              prof.nezam != (int)Hire.Hire.militaryStatus.غير_مشمول &&
                              prof.nezam != (int)Hire.Hire.militaryStatus.برگ_اعزام &&
                              prof.nezam != (int)Hire.Hire.militaryStatus.مشمول &&
                              nezamDoc.Rows.Count > 0) ||
                             !prof.sexIsMan ||
                             (prof.nezam == (int)Hire.Hire.militaryStatus.درحين_خدمت ||
                              prof.nezam == (int)Hire.Hire.militaryStatus.غير_مشمول ||
                              prof.nezam == (int)Hire.Hire.militaryStatus.برگ_اعزام ||
                              prof.nezam == (int)Hire.Hire.militaryStatus.مشمول)))
                        {
                            var BimeDoc = ProfReqBuss.GetDocByInfoIdAndType(infoId, (int)Hire.Hire.DocType.آخرین_مدرک_تحصیلی);
                            if ((prof.bimeType > 0 &&
                                 !string.IsNullOrEmpty(prof.bimeNum) &&
                                 BimeDoc.Rows.Count > 0) || !prof.bime)
                            {
                                var vezaratDoc = ProfReqBuss.GetDocByInfoIdAndType(infoId, (int)Hire.Hire.DocType.ارزشنامه_تحصیلی_وزارت_علوم);
                                if (prof.keshvar > 0 &&
                                    (prof.keshvar != 27 &&
                                     vezaratDoc.Rows.Count > 0) ||
                                    prof.keshvar == 27
                                    )
                                {
                                    var govahiJameDoc = ProfReqBuss.GetDocByInfoIdAndType(infoId, (int)Hire.Hire.DocType.گواهی_امتحان_جامع);
                                    if (prof.maghta > 0 && prof.keshvar > 0 &&
                                        (
                                            (prof.maghta == 13 &&
                                             prof.keshvar == 27 &&
                                             govahiJameDoc.Rows.Count > 0
                                            ) ||
                                            (prof.maghta != 13 ||
                                             prof.keshvar == 27)
                                        ))
                                    {
                                        if ((lastHokm.Martabeh >= 0 &&
                                             lastHokm.Payeh > 0 &&
                                             lastHokm.Type_Estekhdam >= 0 &&
                                             (lastHokm.Nahveh_Hamk > 0) &&
                                             (lastHokm.Uni_Khedmat > 0) &&
                                             (lastHokm.Uni_KhedmatType > 0) &&
                                             !string.IsNullOrEmpty(lastHokm.Date_Hokm) &&
                                             lastHokm.Number_Hokm != "" &&
                                             (lastHokm.MablaghHokm > 0) &&
                                             !string.IsNullOrEmpty(lastHokm.HokmUrl)) ||
                                            (lastHokm.Martabeh < 0)
                                            )
                                        {
                                            return(true);
                                        }
                                        else
                                        {
                                            hokmRequested = false;
                                        }
                                    }
                                    else
                                    {
                                        personalInfoRequested = false;
                                    }
                                }
                                else
                                {
                                    personalInfoRequested = false;
                                }
                            }
                            else
                            {
                                personalInfoRequested = false;
                            }
                        }
                        else
                        {
                            personalInfoRequested = false;
                        }
                    }
                    else
                    {
                        personalInfoRequested = false;
                    }
                }
                else
                {
                    personalInfoRequested = false;
                    hokmRequested         = false;
                }

                if (!string.IsNullOrEmpty(prof.telHome) &&
                    !string.IsNullOrEmpty(prof.telMobile) &&
                    !string.IsNullOrEmpty(prof.addressHome) &&
                    !string.IsNullOrEmpty(prof.codePosti) &&
                    !string.IsNullOrEmpty(prof.email) &&
                    (prof.ostanHome > 0) &&
                    (prof.shahrHome > 0)
                    )
                {
                    contactInfoRequested = false;
                }
            }
            else
            {
                return(true);
            }
            // Set Results
            if (personalInfoRequested)
            {
                errorMsg += "اطلاعات فردی";
            }
            if (contactInfoRequested)
            {
                errorMsg += errorMsg.Length > 0 ? "، " : "";
                errorMsg += "اطلاعات تماس";
            }
            if (hokmRequested)
            {
                errorMsg += errorMsg.Length > 0 ? "، " : "";
                errorMsg += "اطلاعات کارگزینی";
            }
            if (string.IsNullOrEmpty(errorMsg))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        private void LoadInfoToControls()
        {
            int       codeostad = Convert.ToInt32(Session[sessionNames.userID_StudentOstad]);
            DataTable dtResult  = FRB.GetOstadInfoFromHR(codeostad);

            if (dtResult.Rows.Count == 0)
            {
                string msg = "کد استادی شما در هیچ کدام از سامانه ها فعال نیست. لطفا جهت فعال سازی با کارشناس مربوطه تماس حاصل فرمایید";
                RadWindowManager1.RadAlert(msg, 400, 200, "پیام سیستم", "RedirectToMain");
                return;
            }
            Session.Add("hrInfoPeopleId", dtResult.Rows[0]["Id"]);

            ListItem itmSelect = new ListItem("انتخاب کنید", "");
            ListItem itmOther  = new ListItem("سایر", "0");

            DTO.University.Faculty.editInfoStruct editInfo = FRB.getOstadInf(codeostad);

            //Session.Add("hrInfoPeopleId", editInfo.hrId);



            DataTable dtControlToSidaList = FRB.GetAllControlToSidaFields();

            DataRow        existsDrp  = null;
            ChangedInfoDTO oChangeDrp = new ChangedInfoDTO();


            existsDrp = dtControlToSidaList.AsEnumerable()
                        .Where(x => x.Field <string>("ControlName") == drpProvince1.ID + "Value")
                        .FirstOrDefault();
            oChangeDrp                  = new ChangedInfoDTO();
            oChangeDrp.Code_Ostad       = codeostad;
            oChangeDrp.ControlToFieldId = Convert.ToInt32(existsDrp["Id"]);
            oChangeDrp.ControlId        = drpProvince1.ID + "value";
            oChangeDrp.OldValue         = getOldValue(existsDrp["id"].ToString(), editInfo);// as string;
            ChangeList.Add(oChangeDrp);

            existsDrp = dtControlToSidaList.AsEnumerable()
                        .Where(x => x.Field <string>("ControlName") == drpLivingCity.ID + "Value")
                        .FirstOrDefault();
            oChangeDrp                  = new ChangedInfoDTO();
            oChangeDrp.Code_Ostad       = codeostad;
            oChangeDrp.ControlToFieldId = Convert.ToInt32(existsDrp["Id"]);
            oChangeDrp.ControlId        = drpLivingCity.ID + "value";
            oChangeDrp.OldValue         = getOldValue(existsDrp["id"].ToString(), editInfo);// as string;
            ChangeList.Add(oChangeDrp);


            existsDrp = dtControlToSidaList.AsEnumerable()
                        .Where(x => x.Field <string>("ControlName") == drpProvince2.ID + "Value")
                        .FirstOrDefault();
            oChangeDrp                  = new ChangedInfoDTO();
            oChangeDrp.Code_Ostad       = codeostad;
            oChangeDrp.ControlToFieldId = Convert.ToInt32(existsDrp["Id"]);
            oChangeDrp.ControlId        = drpProvince2.ID + "value";
            oChangeDrp.OldValue         = getOldValue(existsDrp["id"].ToString(), editInfo);// as string;
            ChangeList.Add(oChangeDrp);
            existsDrp = dtControlToSidaList.AsEnumerable()
                        .Where(x => x.Field <string>("ControlName") == drpWorkingCity.ID + "Value")
                        .FirstOrDefault();
            oChangeDrp                  = new ChangedInfoDTO();
            oChangeDrp.Code_Ostad       = codeostad;
            oChangeDrp.ControlToFieldId = Convert.ToInt32(existsDrp["Id"]);
            oChangeDrp.ControlId        = drpWorkingCity.ID + "value";
            oChangeDrp.OldValue         = getOldValue(existsDrp["id"].ToString(), editInfo);// as string;
            ChangeList.Add(oChangeDrp);

            foreach (Control item in dvAddressFileds.Controls)
            {
                DataRow exists = null;
                if (item is TextBox)
                {
                    exists = dtControlToSidaList.AsEnumerable()
                             .Where(x => x.Field <string>("ControlName") == item.ID)
                             .FirstOrDefault();
                }

                if (exists != null)
                {
                    ChangedInfoDTO oChange = new ChangedInfoDTO();
                    oChange.Code_Ostad       = codeostad;
                    oChange.ControlToFieldId = Convert.ToInt32(exists["Id"]);
                    oChange.ControlId        = item.ID;
                    oChange.OldValue         = getOldValue(exists["id"].ToString(), editInfo);// as string;
                    ChangeList.Add(oChange);
                }
            }

            ViewState.Add("ChangeList", ChangeList);

            txtHomePhone.Text = editInfo.telHome.ToString();

            txtWorkPhone.Text      = editInfo.telKar.ToString();
            txtMobileNumber.Text   = editInfo.telMobile.ToString();
            txtLivingAddress.Text  = editInfo.addressHome.ToString();
            txtWorkingAddress.Text = editInfo.addressKar.ToString();
            txtLivingZipCode.Text  = editInfo.codePosti.ToString();
            txtEmail.Text          = editInfo.email.ToString();

            setDropDownOstanSource(drpProvince1, editInfo.ostanHome);
            setDropDownOstanSource(drpProvince2, editInfo.ostanKar);
            setDropDownShahrSource(drpLivingCity, editInfo.ostanHome, editInfo.shahrHome);
            setDropDownShahrSource(drpWorkingCity, editInfo.ostanKar, editInfo.shahrKar);
        }
Ejemplo n.º 3
0
        private void LoadInfoToControls()
        {
            ListItem itmSelect = new ListItem("انتخاب کنید", "-1");
            ListItem itmOther  = new ListItem("سایر", "0");
            int      codeostad = Convert.ToInt32(Session[sessionNames.userID_StudentOstad]);

            DTO.University.Faculty.editInfoStruct editInfo = FRB.getOstadInf(codeostad);

            //Session.Add("hrInfoPeopleId", editInfo.hrId);
            DataTable dtResault = FRB.GetOstadInfoFromHR(codeostad);

            if (dtResault.Rows.Count == 0)
            {
                string msg = "کد استادی شما در هیچ کدام از سامانه ها فعال نیست. لطفا جهت فعال سازی با کارشناس مربوطه تماس حاصل فرمایید";
                RadWindowManager1.RadAlert(msg, 400, 200, "پیام سیستم", "RedirectToMain");
                return;
            }
            Session.Add("hrInfoPeopleId", dtResault.Rows[0]["Id"]);


            DataTable dtControlToSidaList = FRB.GetAllControlToSidaFields();

            txtCodeMeli.Text   = editInfo.idd_Melli;
            txtFirstName.Text  = editInfo.name;
            txtFamily.Text     = editInfo.family;
            txtFatherName.Text = editInfo.fatherName;
            AddValueToChangeList(codeostad, dtControlToSidaList, txtFatherName.Text, txtFatherName.ID);
            txtShCode.Text = editInfo.idd;
            AddValueToChangeList(codeostad, dtControlToSidaList, txtShCode.Text, txtShCode.ID);
            txtYearBorn.Text = editInfo.salTavalod;
            AddValueToChangeList(codeostad, dtControlToSidaList, txtYearBorn.Text, txtYearBorn.ID);

            drpNezam.DataSource     = CB.GetStatusMilitary_fcoding();
            drpNezam.DataTextField  = "namecoding";
            drpNezam.DataValueField = "id";
            drpNezam.DataBind();
            drpNezam.Items.Insert(0, new ListItem(itmSelect.Text, itmSelect.Value));
            drpNezam.Items.Insert(drpNezam.Items.Count, new ListItem(itmOther.Text, itmOther.Value));
            drpNezam.SelectedValue = editInfo.nezam.ToString();
            AddValueToChangeList(codeostad, dtControlToSidaList, drpNezam.SelectedValue, drpNezam.ID + "Value");

            rdblMarriage.SelectedValue = editInfo.taahol ? "2" : "1";
            AddValueToChangeList(codeostad, dtControlToSidaList, rdblMarriage.SelectedValue, rdblMarriage.ID);

            rblGender.SelectedValue = editInfo.sexIsMan ? "1" : "2";
            AddValueToChangeList(codeostad, dtControlToSidaList, rblGender.SelectedValue, rblGender.ID);
            if (!editInfo.sexIsMan)
            {
                pnlMilitary.Visible = false;
            }

            drpLastMaghta.Items.Clear();
            drpLastMaghta.DataSource     = CB.GetCodingByTypeId(2);
            drpLastMaghta.DataValueField = "Id";
            drpLastMaghta.DataTextField  = "namecoding";
            drpLastMaghta.DataBind();
            drpLastMaghta.Items.Insert(0, new ListItem(itmSelect.Text, itmSelect.Value));
            drpLastMaghta.SelectedValue = editInfo.maghta.ToString();
            AddValueToChangeList(codeostad, dtControlToSidaList, editInfo.maghta == 0 ? "" : editInfo.maghta.ToString(), drpLastMaghta.ID + "Value");

            DataTable dtField = CB.SelectField_fcoding();

            for (int i = 0; i <= dtField.Rows.Count - 1; i++)
            {
                dtField.Rows[i]["nameresh"] = dtField.Rows[i]["nameresh"].ToString().Replace("ي", "ی");
            }
            drpReshte.DataSource     = dtField;
            drpReshte.DataTextField  = "nameresh";
            drpReshte.DataValueField = "id";
            drpReshte.DataBind();
            drpReshte.Items.Insert(0, new RadComboBoxItem(itmSelect.Text, itmSelect.Value));
            drpReshte.Items.Insert(drpReshte.Items.Count, new RadComboBoxItem(itmOther.Text, itmOther.Value));
            drpReshte.SelectedValue = editInfo.reshte.ToString();
            AddValueToChangeList(codeostad, dtControlToSidaList, editInfo.reshte == 0 ? "" : editInfo.reshte.ToString(), drpReshte.ID + "Value");



            drpUniversityType.SelectedValue = editInfo.typeUniMadrak.ToString();
            AddValueToChangeList(codeostad, dtControlToSidaList, drpUniversityType.SelectedValue, drpUniversityType.ID + "Value");


            txtSiba.Text = editInfo.siba;
            AddValueToChangeList(codeostad, dtControlToSidaList, editInfo.siba, txtSiba.ID);


            txtYearGetMadrak.Text = editInfo.salMadrak;
            AddValueToChangeList(codeostad, dtControlToSidaList, editInfo.salMadrak, txtYearGetMadrak.ID);


            txtSanavat.Text = editInfo.sanavat;
            AddValueToChangeList(codeostad, dtControlToSidaList, editInfo.sanavat, txtSanavat.ID);

            DataTable dtCountrySource = CB.GetNameCountry_fcoding();

            drpCountry.DataSource     = dtCountrySource.Select("id<56").CopyToDataTable();
            drpCountry.DataTextField  = "namecoding";
            drpCountry.DataValueField = "id";
            drpCountry.DataBind();
            drpCountry.Items.Insert(0, new ListItem(itmSelect.Text, itmSelect.Value));
            drpCountry.SelectedValue = editInfo.keshvar.ToString();
            AddValueToChangeList(codeostad, dtControlToSidaList, editInfo.keshvar.ToString(), drpCountry.ID + "Value");

            DataTable dtUniName = CB.GetNameUni_fcoding();

            for (int i = 0; i <= dtUniName.Rows.Count - 1; i++)
            {
                dtUniName.Rows[i][0] = dtUniName.Rows[i][0].ToString().Replace("ي", "ی");
            }
            drpUniName.DataSource     = dtUniName;
            drpUniName.DataTextField  = "namecoding";
            drpUniName.DataValueField = "ID";
            drpUniName.DataBind();
            drpUniName.Items.Insert(0, new RadComboBoxItem(itmSelect.Text, itmSelect.Value));
            drpUniName.Items.Insert(drpUniName.Items.Count, new RadComboBoxItem(itmOther.Text, itmOther.Value));
            drpUniName.SelectedValue = editInfo.nameUniMadrak.ToString();
            AddValueToChangeList(codeostad, dtControlToSidaList, drpUniName.SelectedValue, drpUniName.ID + "Value");

            if (editInfo.bime)
            {
                rdblBimehStatus.SelectedValue = "1";
                drpBimehType.Enabled          = true;
                txtInsuranceNumber.Enabled    = true;
                drpBimehType.SelectedValue    = editInfo.bimeType.ToString();
                txtInsuranceNumber.Text       = editInfo.bimeNum;
                drpBimehType.Enabled          = true;
                txtInsuranceNumber.Enabled    = true;
            }
            else
            {
                rdblBimehStatus.SelectedValue = "2";
            }
            AddValueToChangeList(codeostad, dtControlToSidaList, drpBimehType.SelectedValue, drpBimehType.ID + "Value");
            AddValueToChangeList(codeostad, dtControlToSidaList, txtInsuranceNumber.Text, txtInsuranceNumber.ID);

            chbkIsRetired.Checked = editInfo.bazneshaste;

            AddValueToChangeList(codeostad, dtControlToSidaList, chbkIsRetired.Checked.ToString(), "chbkIsRetired");


            ViewState.Add(listOfChanges, ChangeList);
            getScansAreNotInDB();
        }