protected void GridTask_RowUpdating(object sender, GridViewUpdateEventArgs e) { GridViewRow row = GridTask.Rows[e.RowIndex]; Label lblID = (Label)row.FindControl("lblID"); // Label lblID = (Label)row.FindControl("Label1"); int ID = Convert.ToInt32(lblID.Text); TextBox txtTergetQty = ((TextBox)row.FindControl("txtTergetQty")); TextBox txtSchedule_Date = ((TextBox)row.FindControl("txtSchedule_Date")); DropDownList ddlStatus = ((DropDownList)row.FindControl("ddlStatus")); DropDownList ddlResposiblePerson = ((DropDownList)row.FindControl("ddlResposiblePerson")); TextBox txtComments = ((TextBox)row.FindControl("txtComments")); LC_Task_Details aLC_Task_Details = new LC_Task_Details(); aLC_Task_Details.Order_No = txtOrder.Text; DateTime?nullabledate = null; aLC_Task_Details.Schedule_Date = txtSchedule_Date.Text == ""?nullabledate: Convert.ToDateTime(txtSchedule_Date.Text); aLC_Task_Details.Responsible_Person = ddlResposiblePerson.SelectedValue; aLC_Task_Details.Status = ddlStatus.SelectedValue; aLC_Task_Details.Comments = txtComments.Text; aLC_Task_Details.EditDate = DateTime.Today; aLC_Task_Details.EditUser = ((SessionUser)Session["SessionUser"]).UserId; aLC_Task_Details.OCode = ((SessionUser)Session["SessionUser"]).OCode; int result1 = masterBLL.UpdateTaskDetails(aLC_Task_Details, ID); if (result1 == 1) { //GridTask.EditIndex = -1; //LoadTaskDetails(); ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Updated Sucessfully')", true); } }
private void InsertProductionProcess() { try { bool isOrderExist = masterBLL.isTaskOrderExist(txtOrder.Text); if (isOrderExist != true) { string OCode = Convert.ToString(((SessionUser)Session["SessionUser"]).OCode); List <LC_InputType> InputType = inputTypeBll.GetALLTask(OCode); if (InputType.Count > 0) { foreach (var item in InputType) { LC_Task_Details aLC_Task_Details = new LC_Task_Details(); aLC_Task_Details.Task = item.Input_Name; aLC_Task_Details.Order_No = txtOrder.Text; aLC_Task_Details.Schedule_Date = null; aLC_Task_Details.Responsible_Person = null; aLC_Task_Details.Status = "Pending"; aLC_Task_Details.EditDate = DateTime.Today; aLC_Task_Details.EditUser = ((SessionUser)Session["SessionUser"]).UserId; aLC_Task_Details.Create_Date = DateTime.Today; aLC_Task_Details.Create_User = ((SessionUser)Session["SessionUser"]).UserId; aLC_Task_Details.OCode = ((SessionUser)Session["SessionUser"]).OCode; int result1 = masterBLL.InsertTaskDetails(aLC_Task_Details); } } } } catch (Exception ex) { throw ex; } }
internal int UpdateTaskDetails(LC_Task_Details aLC_Task_Details, int ID) { return(_masterlcDAL.UpdateTaskDetails(aLC_Task_Details, ID)); }
internal int InsertTaskDetails(LC_Task_Details aLC_Task_Details) { return(_masterlcDAL.InsertTaskDetails(aLC_Task_Details)); }