public static string SeedProcess_Add(string txtDateBuy, string txtDateOfManufacture, string txtEndTime, string txtParcel, string txtArea, float txtQuantity, float txtAreaUnit, int DDLSeedsName, int txtKey, string DDLAreaUnit, string DDLQuantityUnit) { int memberID = HttpContext.Current.Session["MemberID"].ToInt(); SeedProces_Info info = new SeedProces_Info(0); info.DateOfManufacture = DateTime.ParseExact(txtDateBuy, "dd/MM/yyyy", CultureInfo.InvariantCulture); info.DateBuy = DateTime.ParseExact(txtDateOfManufacture, "dd/MM/yyyy", CultureInfo.InvariantCulture); info.EndTime = DateTime.ParseExact(txtEndTime, "dd/MM/yyyy", CultureInfo.InvariantCulture); info.SeedsKey = DDLSeedsName.ToString(); info.Quantity = (txtQuantity); info.Parcel = txtParcel; info.Area = float.Parse(txtArea); info.MemberKey = memberID; info.AreaUnit = int.Parse(DDLAreaUnit); info.QuantityUnit = int.Parse(DDLQuantityUnit); info.Save(); return(""); }
protected void GV_SeedProcess_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "ItemFrontPage") { int Key = int.Parse(e.CommandArgument.ToString()); SeedProces_Info info = new SeedProces_Info(Key); if (info.Status) { info.Status = false; } else { info.Status = true; } info.Save(); LoadData(); } }