private void cbbSave_Click(object sender, EventArgs e) { try { result = objManager.ClsVehicles_insert(uC_vehicleDetails31.uC_PlatesCar1.rddlTypePlate.SelectedIndex, uC_vehicleDetails31.uC_PlatesCar1.CarNumber, null, uC_vehicleDetails31.rtbColor.Text, uC_vehicleDetails31.rtbModel.Text, uC_vehicleDetails31.indexTypeModel, uC_vehicleDetails31.rddlState.SelectedIndex == 0); if (result.success) { // eventClearProperiesItems(); //objManager.EmptyControls ( myAll ); ItemsPublic.ShowMessage(ItemsPublic._infoNew); this.DialogResult = DialogResult.OK; this.Close(); } else { MessageBox.Show(result.Message); } } catch (Exception ex) { ItemsPublic.ShowMessage(ex.Message); // this.DialogResult = DialogResult.Cancel; //this.Close(); } }
private void lightsMainMode1_EsmaeilNormal() { try { timerNews.Stop(); if (ItemsPublic._EsiGate.none == mygate) { GEventer("متاسفانه گیت شناسه معتبر ندارد"); return; } OutputDatas result = GateManager.EsiContSetNewMode(mygate, ItemsPublic.MiniGateMainEsiMode.NormalGate); if (result.success) { if (result.EsiBool) { GEventer("دستور رفتن به وضعیت عادی با موفقیت ارسال شد"); } else { GEventer("ارسال دستور به دلیل فنی زیر ناموفق بود", result.EsiMessage); } } else { GEventer("تست وضعیت عادی گیت به دلیل زیر ناموفق بود", result.Message); } timerNews.Start(); } catch (Exception ex) { GEventer("خطای بحرانی: ", ex.Message); } }
private void rbtnSelectPerson_Click(object sender, EventArgs e) { try { CursorWait(); result = objManager.View_persons( null, null, null, null, rtbName.Text.Trim(), rtbSurname.Text.Trim(), rtbNationalCode.Text.Trim(), null, null, null, string.Empty); if (result.success) { radGridViewSelected.DataSource = result.ResultTable; if (radGridViewSelected.Rows.Count < 1) { CursorDefault(); ItemsPublic.ShowMessage("موردی یافت نشد"); } } else { MessageBox.Show(result.Message); } CursorDefault(); } catch (Exception ex) { MessageBox.Show(ex.Message); CursorDefault(); } }
private void LightGoOut_EsmaeilFree() { try { timerNews.Stop(); if (ItemsPublic._EsiGate.none == mygate) { GEventer("متاسفانه گیت شناسه معتبر ندارد"); return; } OutputDatas result = GateManager.EsiContSetNewWay(mygate , (ItemsPublic.MiniGateWayEsiMode)(int) myCurrentState.ResultTable.Rows[0]["MiniGateWayEsiMode_Id"] , ItemsPublic.MiniGateWayEsiMode.free ); if (result.success) { if (result.EsiBool) { GEventer("دستور جدید ارسال شد"); } else { GEventer("ارسال دستور به دلیل فنی زیر ناموفق بود", result.EsiMessage); } } else { GEventer("تنظیم مسیر به دلیل زیر ناموفق بود", result.Message); } timerNews.Start(); } catch (Exception ex) { GEventer("خطای بحرانی: ", ex.Message); } }
private void freerumode() { try { timerNews.Stop(); if (ItemsPublic._EsiGate.none == mygate) { GEventer("متاسفانه گیت شناسه معتبر ندارد"); return; } OutputDatas result = GateManager.EsiContSetNewMode(mygate, ItemsPublic.MiniGateMainEsiMode.FreeRunGate); if (result.success) { if (result.EsiBool) { GEventer("دستور عبور آزاد با موفقیت ارسال شد"); } else { GEventer("ارسال دستور به دلیل فنی زیر ناموفق بود", result.EsiMessage); } } else { GEventer("تست عبور آزاد به دلیل زیر ناموفق بود", result.Message); } timerNews.Start(); } catch (Exception ex) { GEventer("خطای بحرانی: ", ex.Message); } }
private void frm_SelectGroups_Load(object sender, EventArgs e) { result = objManager.View_groups(null, null, null); if (result.success) { radGridViewSearch.DataSource = result.ResultTable; if (CurrentInfo != null) { foreach (int item in CurrentInfo) { radGridViewSelected.Rows.AddNew(); GridViewRowInfo FindRow = radGridViewSearch.Rows.Single(x => (int)x.Cells["Group_ID"].Value == item); for (int index = 0; index < radGridViewSearch.Columns.Count; index++) { //col = ""; //result.ResultTable.Rows[0][col.ColumnName]; radGridViewSelected.CurrentRow.Cells [index].Value = FindRow.Cells [index].Value; } } } } else { MessageBox.Show(result.Message); this.Close(); } }
private void rbtnSearch_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(rtbSearch.Text)) { return; } CursorWait(); rlblHint.Visible = false; var objManager = new Manager(); if (rrbPackId.IsChecked) { result = objManager.View_packages(false, null, null, null, null, null, null , null, null, null, null, null, ConvertNumbers.Base36ToInt64(rtbSearch.Text.Trim().ToUpper()).ToString(), null, null, null, 3); } else if (rrbGatePassId.IsChecked) { result = objManager.View_packages(false, null, null, null, null, null, null , null, null, null, null, null, null, ConvertNumbers.Base36ToInt64(rtbSearch.Text.Trim().ToUpper()).ToString(), null, null, 3); } else if (rrbNationalCode.IsChecked) { result = objManager.View_packages(false, null, null, null, null, null, null , null, null, null, null, rtbSearch.Text.Trim(), null, null, null, null, 3); } if (result.success) { if (result.ResultTable.Rows.Count > 0) { eventEndSearch(); } else { rlblHint.Visible = true; } //MainRadGridView.DataSource = result.ResultTable; // MainRadGridView.Enabled = true; //ItemsPublic.MyStatus = ItemsPublic.IndexStatus.toView; } else { MessageBox.Show(result.Message); } inFocus(); CursorDefault(); //Person_NationalCode = uC_PacksSearch1.rmebNationalCode.Text.Trim (); //this.DialogResult = DialogResult.OK; //this.Close (); } catch (Exception ex) { inFocus(); CursorDefault(); ItemsPublic.ShowMessage(ex.Message); } }
private void FindInfo(string myStr) { EmptyProperty(); radGridViewSearch.DataSource = null; if (myStr.Trim().Count() == 10) { myStr = myStr.Replace("\r\n", ""); result = objManager.View_persons(null, null, null, null, null, null, null, null, null, null, myStr); if (result.success) { radGridViewSearch.DataSource = result.ResultTable; if (radGridViewSearch.Rows.Count > 0) { SetProperty(radGridViewSearch.Rows[0].Cells["Person_Name"].Value.ToString() , radGridViewSearch.Rows[0].Cells["Person_Surname"].Value.ToString() , radGridViewSearch.Rows[0].Cells["Person_LabelIsWoman"].Value.ToString()); } else { if (ItemsPublic.IsDigitNumber(rtbSearchPerson.Text.Trim(), 10) && (ItemsPublic.NationalCodeIsTrue(rtbSearchPerson.Text.Trim()))) { if (QuestionSureToAddNewUser()) { var frm = new frm_PersonTempAddingGp2(); frm.uC_PersonDetailsMini21.rmebNationalCode.Text = rtbSearchPerson.Text; frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { radGridViewSelected.Rows.AddNew(); foreach (DataColumn col in frm.result.ResultTable.Columns) { if (col.ColumnName == "Person_Temp" || col.ColumnName == "Person_IsBlackTemp") { continue; } radGridViewSelected.CurrentRow.Cells[col.ColumnName].Value = frm.result.ResultTable.Rows[0][col.ColumnName]; } radGridViewSelected.CurrentRow = null; } frm.Close(); rtbSearchPerson.Text = string.Empty; } } else { MessageBox.Show("مقدار وارد شده جهت کد ملی نا معتبر می باشد"); } rtbSearchPerson.Focus(); } } else { MessageBox.Show(result.Message); } } }
private void cbbSave_Click(object sender, EventArgs e) { try { bool idCodeValid; if (uC_PersonDetailsMini21.rmeIdentifyCode.Text.Trim() == string.Empty || uC_PersonDetailsMini21.rmeIdentifyCode.Text.Trim() == "0") { idCodeValid = false; } else { idCodeValid = true; } result = objManager.ClsPersons_insert(uC_PersonDetailsMini21.rtbName.Text.Trim(), uC_PersonDetailsMini21.rtbSurname.Text.Trim(), uC_PersonDetailsMini21.rmebNationalCode.Text.Trim(), uC_PersonDetailsMini21.comboNationality.ReturnSaveIfNew(), uC_PersonDetailsMini21.rtbFatherName.Text.Trim(), uC_PersonDetailsMini21.comboBirthCity.ReturnSaveIfNew(), (uC_PersonDetailsMini21.bdcBirthDate.SelectedDate != null) ? uC_PersonDetailsMini21.bdcBirthDate.SelectedDate.Value : (DateTime?)null, uC_PersonDetailsMini21.rmebLicenseDriveCode.Text.Trim(), uC_PersonDetailsMini21.rmebPhone1.Text.Trim(), uC_PersonDetailsMini21.rmebPhone2.Text.Trim(), (uC_PersonDetailsMini21.rddlHaveForm.SelectedIndex == 0) ? true : false, ((uC_PersonDetailsMini21.rddlsex.SelectedIndex == -1) ? (bool?)null : ((uC_PersonDetailsMini21.rddlsex.SelectedIndex == 1) ? true : false)) , uC_PersonDetailsMini21.comboRegisterCity.ReturnSaveIfNew() , null, (idCodeValid == true) ? uC_PersonDetailsMini21.rmeIdentifyCode.Text.Trim() : string.Empty , uC_PersonDetailsMini21.rtbRegisterCode.Text.Trim(), null); if (result.success) { // eventClearProperiesItems(); //objManager.EmptyControls ( myAll ); // ItemsPublic.ShowMessage(ItemsPublic._infoNew); this.DialogResult = DialogResult.OK; this.Close(); } else { MessageBox.Show(result.Message); } } catch (Exception ex) { ItemsPublic.ShowMessage(ex.Message); // this.DialogResult = DialogResult.Cancel; //this.Close(); } }
private void SetModelsCar() { Models = null; Models = new OutputDatas(); Models = objManager.View_vehiclesType(null, null); if (!Models.success) { ItemsPublic.Exeptor("خطا در بازآوری اطلاعات انواع خودرو"); } }
public mortezazadehUcGate() { InitializeComponent(); GateManager = new Manager(); myCurrentState = new OutputDatas(); //ttt = new Thread(delegate() //{ // timerNews.Enabled = true; //}); }
private void SetMyRights(int?GroupId) { OutputDatas OD = objManager.View_rights(GroupId, null); if (OD.success) { uC_groupDetails1.RightsRadGridView.DataSource = OD.ResultTable; } else { ItemsPublic.Exeptor(OD.Message); } }
public void SetModelsCar() { Manager objManager2 = new Manager(); var Models = new OutputDatas(); DtModels = null; DtModels = new DataTable(); DtModels.Columns.Add("VehicleType_ID", typeof(int)); DtModels.Columns.Add("VehicleType_Name", typeof(string)); DtModels.Columns.Add("VehicleType_Desc", typeof(string)); DtModels.Columns.Add("VehicleType_Hidden", typeof(bool)); DtModels.Columns.Add("VehicleType_DDLID", typeof(int)); Models = objManager2.View_vehiclesType(null, null); if (!Models.success) { ItemsPublic.Exeptor("خطا در بازآوری اطلاعات انواع خودرو"); } //DtModels = Models.ResultTable.Copy(); int countNotHidden = -1; foreach (DataRow item in Models.ResultTable.Rows) { //countNotHidden++; DtModels.Rows.Add(); DtModels.Rows[DtModels.Rows.Count - 1]["VehicleType_ID"] = item["VehicleType_ID"]; DtModels.Rows[DtModels.Rows.Count - 1]["VehicleType_Name"] = item["VehicleType_Name"]; DtModels.Rows[DtModels.Rows.Count - 1]["VehicleType_Desc"] = item["VehicleType_Desc"]; DtModels.Rows[DtModels.Rows.Count - 1]["VehicleType_Hidden"] = item["VehicleType_Hidden"]; if (!(bool)item["VehicleType_Hidden"]) { countNotHidden++; DtModels.Rows[DtModels.Rows.Count - 1]["VehicleType_DDLID"] = countNotHidden; } else { DtModels.Rows[DtModels.Rows.Count - 1]["VehicleType_DDLID"] = _khali; } if (!(bool)item["VehicleType_Hidden"]) { rddlType.Items.Add((string)item["VehicleType_Name"]); } } //foreach (var row in Models.ResultTable.Rows) //for (int index = 0; index < DtModels.Rows.Count; index++) //{ //} // UC_vehicleDetails31.rddlType.DataSource = Models.ResultTable.Columns["VehicleType_Name"]; }
private void FindInfo(string myStr) { MainRadGridView.DataSource = null; if (myStr.Count() > 1) { result = objManager.View_vehicles(null, null, myStr, null, null); if (result.success) { MainRadGridView.DataSource = result.ResultTable; } else { MessageBox.Show(result.Message); } } }
private void FindInfo(string myStr) { radGridViewSearch.DataSource = null; if (myStr.Count() > 2) { result = objManager.View_persons(null, null, null, false, null, null, null, null, null, null, myStr); if (result.success) { radGridViewSearch.DataSource = result.ResultTable; } else { MessageBox.Show(result.Message); } } }
private void FindInfo() { MainRadGridView.DataSource = null; result = objManager.View_vehicles(uC_vehicleDetailsSearch1.indexTypeModel, uC_vehicleDetailsSearch1.uC_PlatesCar1.rddlTypePlate.SelectedIndex, uC_vehicleDetailsSearch1.uC_PlatesCar1.CarNumber, uC_vehicleDetailsSearch1.rddlState.SelectedIndex, uC_vehicleDetailsSearch1.rtbModel.Text.Trim()); if (result.success) { MainRadGridView.DataSource = result.ResultTable; if (MainRadGridView.Rows.Count < 1) { ItemsPublic.ShowMessage("موردی یافت نشد"); } } else { MessageBox.Show(result.Message); } }
private void Login(int IdOffice, string OffName) { try { ItemsPublic.MyOfficeId = Convert.ToInt32(IdOffice); ItemsPublic.MyOfficeName = OffName;// dt.Rows[comboBox1.SelectedIndex][3].ToString(); var obj = new Customer(); var input = new Dictionary <AllFunctions._IdData, object>(); input.Add(AllFunctions._IdData.Event_ComputerName, System.Net.Dns.GetHostName()); input.Add(AllFunctions._IdData.Operator_BaridId, ItemsPublic.MyBaridId); input.Add(AllFunctions._IdData.Office_ID, ItemsPublic.MyOfficeId); input.Add(AllFunctions._IdData.Event_IpAddress, ItemsPublic.MyIpAddress); input.Add(AllFunctions._IdData.IdMethod, AllFunctions._IdMethod.ClsOffOper_MyOffOperId); var Point = new OutputDatas(); Point = obj.Suit(Serialize.BinarySerialize(input)); // Point = obj.Suit(Class1.BinarySerialize(input)); DataTable dt2; if (Point.success) { dt2 = Point.ResultTable; ItemsPublic.MyOffOperId = Convert.ToDecimal(dt2.Rows[0][0]); var myList2 = new List <AllFunctions._Rights>(); for (int i = 1; i < dt2.Rows.Count; i++) { myList2.Add((AllFunctions._Rights) int.Parse(dt2.Rows[i][0].ToString())); } ItemsPublic.MyRights = myList2; // this.Close(); } else { ItemsPublic.ShowMessage(Point.Message); // MessageBox.Show(); ItemsPublic.AcssesIsDenied = true; // this.Close(); } } catch { // MessageBox.Show("عملیات لاگین به سامانه مجوز تردد با خطا مواجه شده است"); ItemsPublic.ConnectToServer = false; // this.Close(); } ItemsPublic.ConnectToServer = true; }
private void FindInfo(string myStr) { EmptyProperty(); radGridViewSearch.DataSource = null; if (myStr.Count() == 10) { result = objManager.View_persons(null, null, null, false, null, null, null, null, null, null, myStr); if (result.success) { radGridViewSearch.DataSource = result.ResultTable; if (radGridViewSearch.Rows.Count > 0) { SetProperty(radGridViewSearch.Rows[0].Cells["Person_Name"].Value.ToString() , radGridViewSearch.Rows[0].Cells["Person_Surname"].Value.ToString() , radGridViewSearch.Rows[0].Cells["Person_LabelIsWoman"].Value.ToString()); } else { if (QuestionSureToAddNewUser()) { var frm = new frm_PersonTempAdding(); frm.uC_PersonDetailsMini21.rmebNationalCode.Text = rtbSearchPerson.Text; frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { radGridViewSelected.Rows.AddNew(); foreach (DataColumn col in frm.result.ResultTable.Columns) { radGridViewSelected.CurrentRow.Cells[col.ColumnName].Value = frm.result.ResultTable.Rows[0][col.ColumnName]; } radGridViewSelected.CurrentRow = null; } frm.Close(); } } } else { MessageBox.Show(result.Message); } } }
private void FindInfo(string myStr, int typePlate) { MainRadGridView.DataSource = null; if (uC_PlatesCar1.CarNumber != null) { result = objManager.View_vehicles(null, typePlate, myStr, null, null); if (result.success) { MainRadGridView.DataSource = result.ResultTable; if (MainRadGridView.Rows.Count > 0) { } else { if (QuestionSureToAddNewUser()) { var frm = new frm_VehicleTempAdding(); frm.uC_vehicleDetails31.uC_PlatesCar1.rddlTypePlate.SelectedIndex = uC_PlatesCar1.rddlTypePlate.SelectedIndex; frm.uC_vehicleDetails31.uC_PlatesCar1.CarNumber = uC_PlatesCar1.CarNumber; frm.ShowDialog(); if (frm.DialogResult == DialogResult.OK) { MainRadGridView.Rows.AddNew(); foreach (DataColumn col in frm.result.ResultTable.Columns) { MainRadGridView.CurrentRow.Cells[col.ColumnName].Value = frm.result.ResultTable.Rows[0][col.ColumnName]; } MainRadGridView.CurrentRow = MainRadGridView.Rows[0]; } frm.Close(); } } } else { MessageBox.Show(result.Message); } } else { ItemsPublic.ShowMessage("قالب شماره خودرو صحیح نمی باشد"); } }
private void SetConfirmsList() { var objC = new Manager(); ODConfirmer = new OutputDatas(); ODConfirmer = objC.MyConfirmers(null); if (ODConfirmer.success) { // rddlConfirmer.DataSource = ODConfirmer.ResultTable.Columns["BaridName"]; for (int index = 0; index < ODConfirmer.ResultTable.Rows.Count; index++) { rddlConfirmer.Items.Add((string)ODConfirmer.ResultTable.Rows[index]["BaridName"]); } } else { ItemsPublic.ShowMessage(ODConfirmer.Message); } }
private void frm_GlobalSetting_Load(object sender, EventArgs e) { try { result = objManager.ClsGlobalSetting_View(); if (result.success) { ShowProperties(); } else { ItemsPublic.ShowMessage(result.Message); } } catch (Exception ex) { ItemsPublic.ShowMessage(ex.Message); } }
private void frm_SelectOneVehicle_Shown(object sender, EventArgs e) { //uC_CarNumber1.Focus(); uC_PlatesCar1.rddlTypePlate.Focus(); if (PersonId != null) { result = objManager.View_vehiclesComplex(null, null, null, null, null, PersonId, null, null, null, null); if (result != null) { if (result.success) { MainRadGridView.DataSource = result.ResultTable; } else { ItemsPublic.ShowMessage(result.Message); } } } }
private void SetConfirmsList(bool isCurrentOff) { rddlConfirmer.Items.Clear(); var objC = new Manager(); ODConfirmer = new OutputDatas(); ODConfirmer = objC.MyConfirmers(isCurrentOff); if (ODConfirmer.success) { // rddlConfirmer.DataSource = ODConfirmer.ResultTable.Columns["BaridName"]; for (int index = 0; index < ODConfirmer.ResultTable.Rows.Count; index++) { rddlConfirmer.Items.Add((string)ODConfirmer.ResultTable.Rows[index]["Operator_Name"] + " - " + (string)ODConfirmer.ResultTable.Rows[index]["Office_Name"]); } } else { ItemsPublic.ShowMessage(ODConfirmer.Message); // this.Close(); } }
public void SetTypePackList(bool isGp) { rddlTypePack.Items.Clear(); var objC = new Manager(); ODSettings = new OutputDatas(); ODSettings = objC.MyTypesPack(isGp); if (ODSettings.success) { // rddlConfirmer.DataSource = ODConfirmer.ResultTable.Columns["BaridName"]; for (int index = 0; index < ODSettings.ResultTable.Rows.Count; index++) { rddlTypePack.Items.Add((string)ODSettings.ResultTable.Rows[index]["TypePack_Name"]); } } else { ItemsPublic.ShowMessage(ODSettings.Message); // this.Close(); } }
private void cbbSave_Click(object sender, EventArgs e) { try { if (QuestionSureToEdit()) { var listSets = new List <int>(); listSets.Add((uC_globalSettings1.rcbGlobalActive.Checked) ? 1 : 0); listSets.Add((uC_globalSettings1.rcbPrintWithPictureAllowed.Checked ? 1 : 0)); listSets.Add((uC_globalSettings1.rcbPrintWithoutPictureAllowed.Checked ? 1 : 0)); listSets.Add((uC_globalSettings1.rcbPrintAgainGpAllowed.Checked ? 1 : 0)); listSets.Add((uC_globalSettings1.rcbNewRequestPackGPAllowed.Checked ? 1 : 0)); //listSets.Add(int.Parse(uC_globalSettings1.rmebCountTeaching.Text)); // listSets.Add(int.Parse(uC_globalSettings1.rmebCountGuest.Text)); //listSets.Add(int.Parse(uC_globalSettings1.rmebCountTrainee.Text)); // listSets.Add(int.Parse(uC_globalSettings1.rmebCountCompany.Text)); // listSets.Add(int.Parse(uC_globalSettings1.rmebCountAgree.Text)); // listSets.Add(int.Parse(uC_globalSettings1.rmebCountTempWork.Text)); listSets.Add(int.Parse(uC_globalSettings1.rmebGpDelayTime.Text)); listSets.Add((uC_globalSettings1.rcbAllowDigitSign.Checked ? 1 : 0)); result = objManager.ClsGlobalSetting_update(listSets.AsEnumerable()); if (result.success) { MessageBox.Show("تنظیمات سامانه مجوز تردد بروز شد"); this.DialogResult = DialogResult.OK; this.Close(); } else { MessageBox.Show(result.Message); } } } catch (Exception ex) { MessageBox.Show(ex.Message); //this.Close(); } }
private void FindInfo(string myStr) { try { result = objManager.View_offices(myStr); if (result.success) { MainRadGridView.DataSource = result.ResultTable; MainRadGridView.Enabled = true; setTreeView(); } else { MessageBox.Show(result.Message); } } catch (Exception ex) { ItemsPublic.ShowMessage(ex.Message); this.Close(); } }
public static void SetAllLocations() { Manager objManager2 = new Manager(); OutputDatas Result = new OutputDatas(); //DtModels = null; //DtModels = new DataTable (); //DtModels.Columns.Add ( "VehicleType_ID" , typeof ( decimal ) ); //DtModels.Columns.Add ( "VehicleType_Name" , typeof ( string ) ); //DtModels.Columns.Add ( "VehicleType_Desc" , typeof ( string ) ); //DtModels.Columns.Add ( "VehicleType_Hidden" , typeof ( bool ) ); Result = objManager2.View_Nationalities(); AllNationality = new DataTable(); AllNationality.Columns.Add("Nationality_Id", typeof(int)); AllNationality.Columns.Add("Nationality_Name", typeof(string)); AllCity = new DataTable(); AllCity.Columns.Add("City_Id", typeof(int)); AllCity.Columns.Add("City_Name", typeof(string)); if (!Result.success) { ItemsPublic.Exeptor(Result.Message); } foreach (DataRow item in Result.ResultTable.Rows) { AllNationality.Rows.Add(item["Nationality_Id"], item["Nationality_Name"]); } Result = objManager2.View_Cities(); if (!Result.success) { ItemsPublic.Exeptor(Result.Message); } foreach (DataRow item in Result.ResultTable.Rows) { AllCity.Rows.Add(item["City_Id"], item["City_Name"]); } }
public void SetAllTypeBLReasons() { Manager objManager2 = new Manager(); //DtModels = null; //DtModels = new DataTable (); //DtModels.Columns.Add ( "VehicleType_ID" , typeof ( decimal ) ); //DtModels.Columns.Add ( "VehicleType_Name" , typeof ( string ) ); //DtModels.Columns.Add ( "VehicleType_Desc" , typeof ( string ) ); //DtModels.Columns.Add ( "VehicleType_Hidden" , typeof ( bool ) ); types = objManager2.View_bLreasons(null); if (!types.success) { ItemsPublic.Exeptor("خطا در بازآوری اطلاعات دلایل مسدود سازی"); } // DtModels = types.ResultTable.Copy (); //foreach (var row in Models.ResultTable.Rows) //rddlBLReasonType.Items.AddRange ( new string [] { types.ResultTable.} ); for (int index = 0; index < types.ResultTable.Rows.Count; index++) { rddlBLReasonType.Items.Add((string)types.ResultTable.Rows[index]["BLReason_Type"]); } }
private void frm_BlockPerson_Load(object sender, EventArgs e) { if (currentIsBlack == true) { uC_BlackListDetails1.rgbBlackList.Text = "جهت عادی کردن وضعیت فرد انتخابی"; } else if (currentIsBlack == false) { uC_BlackListDetails1.rgbBlackList.Text = "جهت مسدود کردن فرد انتخابی"; } else { ItemsPublic.Exeptor("وضعیت جاری نا مشخص می باشد"); } uC_BlackListDetails1.SetAllTypeBLReasons(); OutputDatas result = new OutputDatas(); result = objManager.View_blackLists(currentPersonId); if (!result.success) { ItemsPublic.ShowMessage(result.Message); return; } radGridView1.DataSource = result.ResultTable; for (int i = 0; i < radGridView1.Rows.Count(); i++) { var str = radGridView1.Rows [i].Cells ["BlackList_DateTime"].Value.ToString().Trim(); var dtItem = DateTime.Parse(str); // MessageBox.Show ( result.ResultTable.Rows [i] ["BlackList_DateTime"].ToString() ); // MessageBox.Show ("item: "+ dtItem.ToString() ); radGridView1.Rows [i].Cells ["BlackList_dtFarsiLabel"].Value = ItemsPublic.GetPersianDate(dtItem); radGridView1.Rows[i].Cells["BlackList_isBalckLabel"].Value = ( bool )radGridView1.Rows [i].Cells ["BlackList_isBlack"].Value ? "مسدود" : "عادی"; //radGridView1.Rows[i].Cells["BLReason_Desc"].Value = } }
private void rbtnSelectPerson_Click(object sender, EventArgs e) { try { CursorWait(); bool?tempType = null; if (rddlTypeAgree.SelectedIndex != -1) { tempType = rddlTypeAgree.SelectedIndex == 0; } result = objManager.View_agreements(null, null, null, null, rtbManagerName.Text.Trim(), string.Empty, rtbCompany.Text.Trim(), tempType, rmebNumber.Text.Trim()); if (result.success) { radGridViewSelected.DataSource = result.ResultTable; if (radGridViewSelected.Rows.Count < 1) { CursorDefault(); ItemsPublic.ShowMessage("موردی یافت نشد"); } } else { MessageBox.Show(result.Message); } CursorDefault(); } catch (Exception ex) { MessageBox.Show(ex.Message); CursorDefault(); } }