示例#1
0
        protected void CreateNewButton1_Click(object sender, EventArgs e)
        {
            PriceChangeJour np = new PriceChangeJour();

            np.Change_log_id_UKM = 0;
            np.Order_no          = 0;
            np.FromTerminal      = true;
            np.Active            = true;
            np.TimeStamp         = DateTime.Now;
            np.InUse             = false;
            context.PriceChangeJours.InsertOnSubmit(np);
            context.SubmitChanges();

            PriceJoursLinqDataSource1.DataBind();
            Gridview1.DataBind();
        }
示例#2
0
        protected void Gridview1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            jourID = (int)Gridview1.DataKeys[e.RowIndex].Value;

            var journ = (from j in context.PriceChangeJours
                         where j.ID == jourID
                         select j).FirstOrDefault();

            journ.Active = false;
            context.SubmitChanges();

            PriceJoursLinqDataSource1.DataBind();
            Gridview1.DataBind();

            e.Cancel = true;
        }
示例#3
0
        protected void CreateNewButton1_Click(object sender, EventArgs e)
        {
            int MobilePrinterNum = 0;

            if (ddlMobilePrinterNum.SelectedIndex != -1)
            {
                MobilePrinterNum = Int32.Parse(ddlMobilePrinterNum.SelectedItem.Value.ToString());
            }

            PriceChangeJour np = new PriceChangeJour();

            np.Change_log_id_UKM = 0;
            np.Order_no          = MobilePrinterNum;
            np.FromTerminal      = true;
            np.Active            = true;
            np.TimeStamp         = DateTime.Now;
            np.InUse             = false;
            context.PriceChangeJours.InsertOnSubmit(np);
            context.SubmitChanges();

            PriceJoursLinqDataSource1.DataBind();
            Gridview1.DataBind();
        }
示例#4
0
 protected void Gridview1_RowDeleted(object sender, GridViewDeletedEventArgs e)
 {
     PriceJoursLinqDataSource1.DataBind();
     Gridview1.DataBind();
 }