protected void ddl_feetype_SelectedIndexChanged(object sender, EventArgs e) { if (ddl_feetype.SelectedItem.Text == "Copies Of Documents") { fnneew.Visible = true; } else { fnneew.Visible = false; } if (ddl_feetype.SelectedValue == "130" || ddl_feetype.SelectedValue == "135") { recurring.Visible = true; } else { recurring.Visible = false; } tbl_lkp_subobj obj = Utilities_Licensing.Feeamount_RetriveAmountSubOrg(Convert.ToInt32(ddl_feetype.SelectedValue)); txt_Amount.Text = obj.Amount.ToString(); hfdoamount.Value = obj.Amount.ToString(); if (obj.Amount == 0) { txt_Amount.Enabled = true; txt_Duedate.Text = DateTime.Now.ToString("MM/dd/yyyy"); } else { txt_Amount.Enabled = false; txt_Duedate.Text = DateTime.Now.ToString("MM/dd/yyyy"); } }
public static int Insert_Subobjdata(int subobjid, string subobjcode, string Desc, string amount, string fullDesc, string objtype) { using (DataClasses1DataContext subobjdatainsert = new DataClasses1DataContext()) { tbl_lkp_subobj subobj; if (subobjid == 0) { subobj = new tbl_lkp_subobj(); } else { subobj = subobjdatainsert.tbl_lkp_subobjs.Where(c => c.Subobj_Id == subobjid).SingleOrDefault(); } subobj.Subobj_code = subobjcode; subobj.Description = Desc; subobj.Amount = Convert.ToDecimal(amount); subobj.Full_Description = fullDesc; subobj.Rev_obj_Id = Convert.ToInt32(objtype); if (subobjid == 0) { subobjdatainsert.tbl_lkp_subobjs.InsertOnSubmit(subobj); } subobjdatainsert.SubmitChanges(); return(subobj.Subobj_Id); } }
public static void DeleteSubobj(int subobjid) { using (DataClasses1DataContext pd = new DataClasses1DataContext()) { tbl_lkp_subobj obj = pd.tbl_lkp_subobjs.Where(c => c.Subobj_Id == subobjid).SingleOrDefault(); pd.tbl_lkp_subobjs.DeleteOnSubmit(obj); pd.SubmitChanges(); } }