protected void btnallot_Click(object sender, EventArgs e)
        {
            var         rea    = ddlhanger.Text + "$" + ddlplane.Text;
            hangerallot newRow = new hangerallot
            {
                allotdetails = rea,
                hangid       = int.Parse(ddlhanger.SelectedItem.Text.Split('-')[0]),
                planeid      = int.Parse(ddlplane.SelectedItem.Text.Split('-')[0]),
                status       = true
            };

            BAL.AdminOperations.allotment(newRow);
        }
Exemple #2
0
 public static bool allotplanes(hangerallot rea)
 {
     if (rea.allotdetails != null)
     {
         using (DBContextDataContext db = new DBContextDataContext())
         {
             db.hangerallots.InsertOnSubmit(rea);
             db.SubmitChanges();
             return(true);
         }
     }
     else
     {
         return(false);
     }
 }
 public static bool allotment(hangerallot rea)
 {
     return(DAL.AdminOperations.allotplanes(rea));
 }