protected void lnkBtnUnpaidSupplierCheques_Click(object sender, EventArgs e) { PanelUnPaidSupplierCheques.Visible = true; PanelPaidSupplierCheques.Visible = false; PanelUpcomingPayableSupplierCheques.Visible = false; lnkBtnUpcomingPayableSupplierCheques.ForeColor = System.Drawing.Color.Black; lnkBtnPaidSupplierCheques.ForeColor = System.Drawing.Color.Black; lnkBtnUnpaidSupplierCheques.ForeColor = System.Drawing.Color.White; GridViewUnPaidSupplierCheques.DataBind(); GridViewUnPaidSupplierCheques.PageIndex = 0; }
protected void ImageButtonConfirmEdit_Click(object sender, ImageClickEventArgs e) { int row_index = ((GridViewRow)((ImageButton)sender).NamingContainer).RowIndex; GridView SupplierCheques = (GridView)((GridViewRow)((ImageButton)sender).NamingContainer).NamingContainer; SupplierCheque SupplierCheque = new SupplierCheque(); int Id = (int)GridViewUnPaidSupplierCheques.DataKeys[row_index].Value; if (!SupplierCheque.Update_UnPaidSupplierCheques_By_Id(Id)) { lblFinishMsg.Text = "هناك مشكلة في التحديث برجاء اعادة المحاولة"; lblFinishMsg.ForeColor = System.Drawing.Color.Red; } else { lblFinishMsg.Text = "تم بنجاح"; lblFinishMsg.ForeColor = System.Drawing.Color.Green; GridViewPaidSupplierCheques.DataBind(); GridViewUnPaidSupplierCheques.DataBind(); GridViewUpcomingPayableSupplierCheques.DataBind(); } }