protected void grdvViewPurchaseOrder_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow && grdvViewPurchaseOrder.EditIndex == e.Row.RowIndex) { PropCategory objcat = new PropCategory(); DropDownList dd2 = (DropDownList)e.Row.FindControl("drpEditCategory"); dd2.DataSource = BusinessNewPurchase.busSelectCategory(objcat); dd2.DataBind(); PropSubCategory objsub = new PropSubCategory(); DropDownList dd3 = (DropDownList)e.Row.FindControl("drpEditSubCategory"); dd3.DataSource = BusinessNewPurchase.busSelectSubCategoryGridview(objsub); dd3.DataBind(); //propunit objUnit = new propunit(); //DropDownList dd4 = (DropDownList)e.Row.FindControl("ddlUnit"); //dd4.DataSource = BusinessNewPurchase.busSelectUnit(objUnit); //dd4.DataBind(); PropSubSubCategory objsubsubsub = new PropSubSubCategory(); DropDownList dd5 = (DropDownList)e.Row.FindControl("drpEditSubSubCategory"); dd5.DataSource = BusinessNewPurchase.buseditmodefillsubcat(objsubsubsub); dd5.DataBind(); } }
protected void ddlSubCat_SelectedIndexChanged(object sender, EventArgs e) { if (ddlSubCat.SelectedIndex != 0) { ddlSubSubCat.Items.Clear(); PropSubCategory obj = new PropSubCategory(); obj.Id = Convert.ToInt32(ddlSubCat.SelectedItem.Value.ToString()); DataSet dsop = new DataSet(); dsop = BusinessNewPurchase.busSelectSubSubCategory(obj); if (dsop.Tables[0].Rows.Count > 0) { ddlSubSubCat.Visible = true; ddlSubSubCat.DataSource = dsop; ddlSubSubCat.DataBind(); } else { ddlSubSubCat.Visible = false; } } else { ddlSubSubCat.Items.Clear(); ddlSubSubCat.Items.Add("-Select-"); } }
public void fill() { PropPurchase prp = new PropPurchase(); prp.PurchaseOr_No = txtPurchaseOrNo.Text; grdViewInfo.DataSource = BusinessNewPurchase.busFillGridView(prp); grdViewInfo.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (Session["data"] != null)//session checking { if (!IsPostBack) { PropDestination objDes = new PropDestination(); ddlSitename.DataSource = BusinessNewPurchase.busFillDestination(objDes); ddlSitename.DataBind(); } } }
protected void grdViewInfo_RowDeleting(object sender, GridViewDeleteEventArgs e) { PropPurchase prop = new PropPurchase(); prop.Purchase_Id = Convert.ToInt32(grdViewInfo.DataKeys[e.RowIndex].Value.ToString()); BusinessNewPurchase.BusDeleteGridView(prop); grdViewInfo.EditIndex = -1; fill(); }
protected void btnSearchbyPurcahseOr_Click1(object sender, EventArgs e) { propInventory obj = new propInventory(); //object initilization obj.Itemname = txtItem.Text; //purchase order no obj.quantity = Convert.ToInt32(txtQty.Text); //product name obj.desc = txtdays.Text; //date of order purchase obj.site = ddlSitename.SelectedItem.Text; //quantity selection int op = BusinessNewPurchase.busNewInventory(obj);//for checking the successful completion }
protected void btnSubmitItem_Click(object sender, EventArgs e) { PropItem newitem = new PropItem(); newitem.Name = txtPopItemName.Text; int op = BusinessNewPurchase.busPopItem(newitem); if (op <= 0) { ClientScript.RegisterStartupScript(Page.GetType(), "test2", "<script>window.opener.location.reload(true);window.close();</script>"); } else { Response.Write("Error in processing.Please Try Again!!"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["data"] != null)//session checking { if (!IsPostBack) { PropVendor objVendor = new PropVendor(); //onject initialization ddlVendorName.DataSource = BusinessNewPurchase.busSelectVendor(objVendor); ddlVendorName.DataBind(); //data binding } } else { Response.Redirect("~/login.aspx"); } }
protected void grdViewInfo_RowUpdating(object sender, GridViewUpdateEventArgs e) { PropPurchase prop = new PropPurchase(); prop.Purchase_Id = Convert.ToInt32(grdViewInfo.DataKeys[e.RowIndex].Value.ToString()); //DropDownList d1 = (DropDownList)grdViewInfo.Rows[e.RowIndex].FindControl("drpeditItem"); //prop.pName = d1.SelectedItem.Text; TextBox t1 = (TextBox)grdViewInfo.Rows[e.RowIndex].FindControl("drpeditItem"); prop.pName = t1.Text; DropDownList d2 = (DropDownList)grdViewInfo.Rows[e.RowIndex].FindControl("drpEditCategory"); prop.Purchase_category = d2.SelectedItem.Text; DropDownList d3 = (DropDownList)grdViewInfo.Rows[e.RowIndex].FindControl("drpEditSubCategory"); prop.subcatname = d3.SelectedItem.Text; DropDownList d5 = (DropDownList)grdViewInfo.Rows[e.RowIndex].FindControl("drpEditSubSubCategory"); prop.subsubcatname = d5.SelectedItem.Text; TextBox t3 = (TextBox)grdViewInfo.Rows[e.RowIndex].FindControl("txtEdtQty"); prop.quantity = Convert.ToDecimal(t3.Text); TextBox t4 = (TextBox)grdViewInfo.Rows[e.RowIndex].FindControl("txtEdtprice"); prop.price = Convert.ToDecimal(t4.Text); DropDownList d4 = (DropDownList)grdViewInfo.Rows[e.RowIndex].FindControl("drplUnit"); prop.Unitname = d4.SelectedItem.Text; TextBox days = (TextBox)grdViewInfo.Rows[e.RowIndex].FindControl("txtday"); prop.day = days.Text; BusinessNewPurchase.BusEditGridView(prop); grdViewInfo.EditIndex = -1; fill(); }
protected void ddlSubCat_SelectedIndexChanged(object sender, EventArgs e) { if (ddlSubCat.SelectedIndex != 0) { ddlSubSubCat.Items.Clear(); PropSubCategory obj = new PropSubCategory(); obj.Id = Convert.ToInt32(ddlSubCat.SelectedItem.Value.ToString()); ddlSubSubCat.DataSource = BusinessNewPurchase.busSelectSubSubCategory(obj); ddlSubSubCat.DataBind(); } else { ddlSubSubCat.Items.Clear(); ddlSubSubCat.Items.Add("-Select-"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["data"] != null) //session checking { if (!IsPostBack) { proptag obj = new proptag(); ddltagpurpose.DataSource = BusinessNewPurchase.dalfilltag(obj); ddltagpurpose.DataBind(); } Label1.Text = ""; } else { Response.Redirect("~/Login.aspx"); } }
protected void btnSubmitsite_Click(object sender, EventArgs e) { PropDestination newsite = new PropDestination(); newsite.Name = txtPopSiteName.Text; newsite.Address = txtaddress.Text; int op = BusinessNewPurchase.busPopSite(newsite); if (op <= 0) { ClientScript.RegisterStartupScript(Page.GetType(), "test21", "<script>window.opener.location.reload(true);window.close();</script>"); } else { Response.Write("Error in processing.Please Try Again!!"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { PropPurchase obj = new PropPurchase(); //object initilization obj.PurchaseOr_No = txtPurchaseOrNo.Text; //purchase order no obj.pName = ddlItemName.SelectedItem.Text; //product name obj.date = Convert.ToDateTime(txtPurcahseDate.Text); //date of order purchase obj.Purchase_category = ddlCategory.SelectedItem.Text; //category selction obj.quantity = Convert.ToDecimal(txtQty.Text); //quantity selection obj.price = Convert.ToDecimal(txtPricePerUnit.Text); //price specifiacation obj.vName = ddlSupplierName.SelectedItem.Text; //vendor name specification obj.Unitname = drplUnit.SelectedItem.Text; //unit name specification int op = BusinessNewPurchase.busNewOrder(obj);//for checking the successful completion if (op <= 0) { Label1.Text = "Successfully inserted"; txtPurchaseOrNo.Text = ""; txtPurcahseDate.Text = ""; ddlItemName.SelectedItem.Text = "-Select-"; ddlCategory.SelectedItem.Text = "-Select-"; txtQty.Text = ""; txtPricePerUnit.Text = ""; ddlSupplierName.SelectedItem.Text = "-Select-"; drplUnit.SelectedItem.Text = "-Select-"; } else { Label1.Text = "Unsuccessful"; } } catch (Exception ex)//exception checking try catch case { Label1.Text = ex.Message.ToString(); } }
protected void btnSubmit_Click(object sender, EventArgs e) { PropVendor newVendor = new PropVendor(); newVendor.Name = txtVendorName.Text; newVendor.address = txtVendorAddress.Text; newVendor.phone = txtPhone.Text; newVendor.AlternatePhone = txtMobile.Text; newVendor.fax = txtFax.Text; newVendor.Email = txtemail.Text; int a = BusinessNewPurchase.buspopVendor(newVendor); if (a <= 0) { ClientScript.RegisterStartupScript(Page.GetType(), "test", "<script>window.opener.location.reload(true);window.close();</script>"); } else { Response.Write("Error in processing.Please Try Again!!"); } }
protected void btnInsert_Click(object sender, EventArgs e) { if (ddlSubSubCat.Text == null) { subsubcat = null; } else { subsubcat = ddlSubSubCat.Text; } PropPurchase add = new PropPurchase(); add.PurchaseOr_No = txtPurchaseOrNo.Text; add.pName = ddlItemName.SelectedItem.Text; add.date = Convert.ToDateTime(txtPurcahseDate.Text); add.Purchase_category = ddlCategory.SelectedItem.Text; add.quantity = Convert.ToDecimal(txtQty.Text); add.price = Convert.ToDecimal(txtPricePerUnit.Text); add.vName = ddlSupplierName.SelectedItem.Text; add.Destination_name = DdlSite.SelectedItem.Text; add.Unitname = drplUnit.SelectedItem.Text; add.subcatname = ddlSubCat.SelectedItem.Text; add.subsubcatname = subsubcat; add.day = txtdays.Text; int op = BusinessNewPurchase.BusAddGridView(add); if (op <= 0) { fill(); Label1.Text = "Successfully inserted"; } else { Label1.Text = "Unsuccessfull"; } }
protected void btnInsert_Click(object sender, EventArgs e) { try { propcash obj = new propcash(); obj.Cash_VNo = txtVocherno.Text; obj.cash_date = Convert.ToDateTime(txtDate.Text); obj.cash_name = txtwhom.Text; obj.Cash_purpose = txtpurpose.Text; obj.cash_tag = ddltagpurpose.SelectedItem.Text; obj.cash_amount = Convert.ToInt32(txtAmount.Text); int op = BusinessNewPurchase.dalbusfillcash(obj); if (op <= 0) { Label1.Text = "Successfully inserted"; txtVocherno.Text = ""; txtDate.Text = ""; txtwhom.Text = ""; txtpurpose.Text = ""; txtAmount.Text = ""; ddltagpurpose.SelectedItem.Text = "-Select-"; } else { Label1.Text = "Unsuccessful"; } } catch (Exception ex) { Label1.Text = ex.Message.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["data"] != null)//session checking { if (!IsPostBack) { PropItem objItem = new PropItem(); ddlItemName.DataSource = BusinessNewPurchase.busSelectItem(objItem); ddlItemName.DataBind();//data binding PropCategory objcat = new PropCategory(); ddlCategory.DataSource = BusinessNewPurchase.busSelectCategory(objcat); ddlCategory.DataBind(); PropVendor objVendor = new PropVendor(); ddlSupplierName.DataSource = BusinessNewPurchase.busSelectVendor(objVendor); ddlSupplierName.DataBind(); PropDestination objDes = new PropDestination(); DdlSite.DataSource = BusinessNewPurchase.busFillDestination(objDes); DdlSite.DataBind(); //propunit objUnit = new propunit(); //drplUnit.DataSource = BusinessNewPurchase.busSelectUnit(objUnit); //drplUnit.DataBind(); addItem.Attributes.Add("onclick", "openPopUp('PopUpItem.aspx')"); AddVendor.Attributes.Add("onclick", "openPopUpVendor('PopUpVendor.aspx')"); } Label1.Text = ""; } else { Response.Redirect("~/Login.aspx");//page redirection } }
protected void Page_Load(object sender, EventArgs e) { if (Session["data"] != null)//session checking { if (!IsPostBack) { PropItem objItem = new PropItem(); ddlSearchItemName.DataSource = BusinessNewPurchase.busSelectItem(objItem); ddlSearchItemName.DataBind(); PropCategory objcat = new PropCategory(); ddlCategory.DataSource = BusinessNewPurchase.busSelectCategory(objcat); ddlCategory.DataBind(); PropVendor objVendor = new PropVendor(); ddlSearchVenderName.DataSource = BusinessNewPurchase.busSelectVendor(objVendor); ddlSearchVenderName.DataBind(); } } else { Response.Redirect("~/Login.aspx"); } }