public void Initializ_Page() { //financial Position initial FinancialPos.Checked = false; FinancialPosTypeList.Enabled = false; AddRelatednumList.Enabled = false; // Khzna_Moved = new KhznaMoved(); Sub_Account = new SubAccount(); MonyTypeDrop.SelectedIndex = 0; //رقم الاذن int MoveID = db.KhznaMoved.ToList().Where(o => o.state == false).Max(k => k.ID) + 1;// Khzna_Moved.maxid(0); OperationID.Enabled = false; OperationID.Text = MoveID.ToString(); //القيمة Value.Text = ""; //من FromSubAccountsID.DataSource = db.SubAccount.ToList().Where(o => o.MainAccount_id != 1103).ToList();// Sub_Account.GetAllSubNotKhazna();//.Select(c=>c.name); FromSubAccountsID.DataValueField = "ID"; FromSubAccountsID.DataTextField = "name"; FromSubAccountsID.DataBind(); //الى ToKhaznaDropRow.Visible = true; ToKhaznaDrop.DataSource = db.SubAccount.ToList().Where(o => o.MainAccount_id == 1103).ToList();//Sub_Account.GetSubAccount_ByUpID(1103); ToKhaznaDrop.DataValueField = "ID"; ToKhaznaDrop.DataTextField = "name"; ToKhaznaDrop.DataBind(); //الملاحظات DescTxt.Text = ""; //التاريخ //ReceivedDate.Text = DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day; ChecqRow.Visible = false; //BankNameRow.Visible = false; SarfDateTxt.Text = DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day; SarfDateRow.Visible = false; Khzna_Moved_List_static = db.KhznaMoved.ToList().Where(k => k.state == false).ToList();// Khzna_Moved.GetKhznaMovedBystate(0); if (Khzna_Moved_List_static.Count > 0) { MonyInSearchBtn.Enabled = true; MonyInsForSerachDrop.DataSource = Khzna_Moved_List_static.Select(KM => KM.ID); MonyInsForSerachDrop.DataBind(); } else { MonyInSearchBtn.Enabled = false; } DeleteMonyInBtn.Enabled = false; ChequeNoTxt.Text = ""; //BankDropID.SelectedIndex = 0; EditFlag = false; //CheckForPrivilage(); }
protected void MonyTypeDrop_SelectedIndexChanged(object sender, EventArgs e) { Sub_Account = new SubAccount(); if (MonyTypeDrop.SelectedIndex == 1) { FinancialPos_td.Visible = false; SolarRowID.Visible = false; EditFlag = false; Bank_Moved = new BankMoved(); int MoveID = db.BankMoved.ToList().Where(b => b.state == false).Max(o => o.ID) + 1; OperationID.Text = MoveID.ToString(); //من FromSubAccountsID.DataSource = db.SubAccount.ToList().Where(s => s.MainAccount_id != 1121).ToList();// Sub_Account.GetAllSubNotIncomsCheq(); //.Select(c => c.name); FromSubAccountsID.DataValueField = "ID"; FromSubAccountsID.DataTextField = "name"; FromSubAccountsID.DataBind(); ChecqRow.Visible = true; //BankNameRow.Visible = true; SarfDateRow.Visible = true; FromKhaznaRow.Visible = true; FromKhaznaDrop.DataSource = db.SubAccount.ToList().Where(s => s.MainAccount_id == 1105);// Sub_Account.GetSubAccount_ByUpID(1105/*1121*/); FromKhaznaDrop.DataValueField = "ID"; FromKhaznaDrop.DataTextField = "name"; FromKhaznaDrop.DataBind(); //ملأ ال Drop down list للبحث Bank_Moved_List_static = db.BankMoved.ToList().Where(b => b.state == true).ToList();// Bank_Moved.GetBankID_state(0); if (Bank_Moved_List_static.Count > 0) { MonyInSearchBtn.Enabled = true; MonyInsForSerachDrop.DataSource = Bank_Moved_List_static.Select(KM => KM.ID); MonyInsForSerachDrop.DataBind(); } else { MonyInSearchBtn.Enabled = false; } } else { Initializ_Page(); } }
public void Initializ_Page() { // بخفي ال شيك بومكس بتاع مركز التكلفه خالص في الشيك FinancialPos_td.Visible = true; SolarRowID.Visible = true; // ReceivedDate.Text = DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day; // CarsList = db.Cars.ToList(); CarsListTxt.DataSource = CarsList; CarsListTxt.DataValueField = "Id"; CarsListTxt.DataTextField = "CarNo"; CarsListTxt.DataBind(); // DriverList = db.Driver.ToList(); DriverListTxt.DataSource = DriverList; DriverListTxt.DataValueField = "Id"; DriverListTxt.DataTextField = "Name"; DriverListTxt.DataBind(); //financial Position initial FinancialPos.Checked = false; ClearSolarDiv(); Khzna_Moved = new KhznaMoved(); Sub_Account = new SubAccount(); MonyTypeDrop.SelectedIndex = 0; //رقم الاذن int MoveID = db.KhznaMoved.ToList().Where(o => o.state == true).Max(k => k.ID) + 1;// Khzna_Moved.maxid(0); //OperationID.Enabled = false; OperationID.Text = MoveID.ToString(); //القيمة Value.Text = ""; //من FromSubAccountsID.DataSource = db.SubAccount.ToList().Where(o => o.MainAccount_id != 1103).ToList();// Sub_Account.GetAllSubNotKhazna();//.Select(c=>c.name); FromSubAccountsID.DataValueField = "ID"; FromSubAccountsID.DataTextField = "name"; FromSubAccountsID.DataBind(); //الى FromKhaznaRow.Visible = true; FromKhaznaDrop.DataSource = db.SubAccount.ToList().Where(o => o.MainAccount_id == 1103).ToList();//Sub_Account.GetSubAccount_ByUpID(1103); FromKhaznaDrop.DataValueField = "ID"; FromKhaznaDrop.DataTextField = "name"; FromKhaznaDrop.DataBind(); //الملاحظات DescTxt.Text = ""; //التاريخ ReceivedDate.Text = ""; /*DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day;*/ ChecqRow.Visible = false; // BankNameRow.Visible = false; SarfDateTxt.Text = DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day; SarfDateRow.Visible = false; Khzna_Moved_List_static = db.KhznaMoved.ToList().Where(k => k.state == true).ToList();// Khzna_Moved.GetKhznaMovedBystate(0); if (Khzna_Moved_List_static.Count > 0) { MonyInSearchBtn.Enabled = true; MonyInsForSerachDrop.DataSource = Khzna_Moved_List_static.Select(KM => KM.ID); MonyInsForSerachDrop.DataBind(); } else { MonyInSearchBtn.Enabled = false; } DeleteMonyInBtn.Enabled = false; ChequeNoTxt.Text = ""; FromKhaznaDrop.SelectedIndex = 0; EditFlag = false; //CheckForPrivilage(); }