public static string[] GetCompletionList(string prefixText, int count, string contextKey) { DMIssueRegister Obj_IR = new DMIssueRegister(); string[] SearchList = Obj_IR.GetSuggestedRecord(prefixText); return(SearchList); }
protected void GrdReport_RowDeleting(object sender, GridViewDeleteEventArgs e) { try { int DeleteId = 0; int CurRow = Convert.ToInt32(e.RowIndex); DeleteId = Convert.ToInt32(GrdReport.Rows[CurRow].Cells[7].Text); //ViewState["EditID"] = IssueRegisterID; if (DeleteId != 0) { Entity_IssueRegister.IssueRegisterId = DeleteId; Entity_IssueRegister.UserId = Convert.ToInt32(Session["UserID"]); Entity_IssueRegister.LoginDate = DateTime.Now; Entity_IssueRegister.IsDeleted = true; int iDelete = Obj_IssueRegister.DeleteIssueRegister(ref Entity_IssueRegister, out StrError); if (iDelete != 0) { Obj_Comm.ShowPopUpMsg("Record Succesfully Deleted", this.Page); MakeEmptyForm(); } } Entity_IssueRegister = null; Obj_IssueRegister = null; } catch (Exception ex) { throw new Exception(ex.Message); } }
private void ReportGrid(string RepCondition) { try { DS = Obj_IssueRegister.GetIssueRegister(StrCondition, out StrError); if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0) { GrdReport.DataSource = DS.Tables[0]; GrdReport.DataBind(); } else { GrdReport.DataSource = null; GrdReport.DataBind(); } Obj_IssueRegister = null; DS = null; } catch (Exception ex) { throw new Exception(ex.Message); } }
protected void BtnSave_Click(object sender, EventArgs e) { int InsertRow = 0, InsertRowDetails = 0; try { if (ChkDetails() == true) { Entity_IssueRegister.IssueNo = TxtMIssueNo.Text; Entity_IssueRegister.IssueDate = !string.IsNullOrEmpty(TxtReqstnDate.Text)?Convert.ToDateTime(TxtReqstnDate.Text.Trim()):DateTime.Now; Entity_IssueRegister.EmployeeId = Convert.ToString(Session["UserId"]);//Convert.ToString(ddlIssueTo.SelectedValue); Entity_IssueRegister.RequisitionCafeId = Convert.ToInt32(ddlRequisitionNo.SelectedValue); Entity_IssueRegister.UserId = Convert.ToInt32(Session["UserId"]); Entity_IssueRegister.LoginDate = DateTime.Now; Entity_IssueRegister.IsDeleted = false; InsertRow = Obj_IssueRegister.InsertIssueRegister(ref Entity_IssueRegister, out StrError); if (InsertRow > 0) { if (ViewState["CurrentTable"] != null) { for (int i = 0; i < GridDetails.Rows.Count; i++) { if (Convert.ToInt32(((TextBox)GridDetails.Rows[i].FindControl("TxtIssueQty")).Text) > 0) { Entity_IssueRegister.IssueRegisterId = InsertRow; Entity_IssueRegister.ItemId = Convert.ToInt32(GridDetails.Rows[i].Cells[0].Text); Entity_IssueRegister.IssueQty = Convert.ToDecimal(((TextBox)GridDetails.Rows[i].FindControl("TxtIssueQty")).Text); // Entity_IssueRegister.StockLocationID = Convert.ToInt32(((DropDownList)GridDetails.Rows[i].FindControl("ddlIssueLocation")).SelectedValue); Entity_IssueRegister.Notes = Convert.ToString(((TextBox)GridDetails.Rows[i].FindControl("TxtNotes")).Text); string[] OrderQty1 = (GridDetails.Rows[i].Cells[6].Text).Split(' '); decimal OrderQty = Convert.ToDecimal(OrderQty1[0]); Entity_IssueRegister.PendingQty = (Convert.ToDecimal(OrderQty) - Convert.ToDecimal(((TextBox)GridDetails.Rows[i].FindControl("TxtIssueQty")).Text));//Convert.ToDecimal(OrderQty); string[] OrderQty2 = (GridDetails.Rows[i].Cells[4].Text).Split(' '); decimal OrderQty3 = Convert.ToDecimal(OrderQty2[0]); Entity_IssueRegister.Qty = Convert.ToDecimal(OrderQty3); InsertRowDetails = Obj_IssueRegister.InsertIssueRegisterDetails(ref Entity_IssueRegister, out StrError); } } } if (InsertRow > 0) { Obj_Comm.ShowPopUpMsg("Record Saved Successfully...!", this.Page); MakeEmptyForm(); ddlRequisitionNo.SelectedValue = "0"; Entity_IssueRegister = null; Obj_IssueRegister = null; } } } else { Obj_Comm.ShowPopUpMsg("Please Enter Details...!", this.Page); } } catch (Exception ex) { throw new Exception(ex.Message); } }