Ejemplo n.º 1
0
        protected override void billDelRow()
        {
            if (docFLAG.SelectedValue != "M")
            {
                Alert.Show("非『新增』单据不能删行!", "消息提示", MessageBoxIcon.Warning);
                return;
            }
            if (!CheckFlagForM())
            {
                Alert.Show("此单据已经被别人操作,请等待操作!");
                return;
            }
            if (GridGoods.SelectedCell == null)
            {
                Alert.Show("当前未选中单元行,无法进行操作!", "消息提示", MessageBoxIcon.Warning);
                return;
            }
            int rowIndex = GridGoods.SelectedRowIndex;

            //PageContext.RegisterStartupScript(GridGoods.GetDeleteRowReference(rowIndex) + Grid_Goods.GetSelectedCellReference());
            PageContext.RegisterStartupScript(GridGoods.GetDeleteRowReference(rowIndex));

            PubFunc.FormLock(FormDoc, true, "");
            docMEMO.Enabled = true;
        }
Ejemplo n.º 2
0
 protected override void billDelRow()
 {
     if (docFLAG.SelectedValue != "N")
     {
         Alert.Show("非『新增』单据不能删行!", "消息提示", MessageBoxIcon.Warning);
         return;
     }
     if (GridGoods.SelectedRowID == null)
     {
         Alert.Show("当前未选中单元行,无法进行操作!", "消息提示", MessageBoxIcon.Warning);
         return;
     }
     PageContext.RegisterStartupScript(GridGoods.GetDeleteRowReference(GridGoods.SelectedRowID));
     PubFunc.FormLock(FormDoc, true, "");
 }
Ejemplo n.º 3
0
        protected override void billDelRow()
        {
            if (ddlFLAG.SelectedValue != "N" && ddlFLAG.SelectedValue != "R")
            {
                Alert.Show("非新增单据不能删除!");
                return;
            }
            if (GridGoods.SelectedCell == null)
            {
                return;
            }
            int rowIndex = GridGoods.SelectedRowIndex;

            PageContext.RegisterStartupScript(GridGoods.GetDeleteRowReference(rowIndex));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// FineUIPro.Grid控件数据加载
        /// </summary>
        /// <param name="row">要加载的行数据</param>
        /// <param name="firstRow">是否插入指定行</param>
        /// <param name="flag">数据来源:NEW-从数据库中获得,用于商品新增时;OLD-从销售单据明细中获得,用于修改或审核时</param>
        private void LoadGridRow(DataRow row, bool firstRow = true, string flag = "NEW")
        {
            decimal price = 0, number = 0;

            decimal.TryParse(row["HSJJ"].ToString(), out price);
            decimal.TryParse(row["BZHL"].ToString(), out number);
            row["HSJE"] = (price * number).ToString();
            JObject defaultObj = new JObject();

            defaultObj.Add("GDSEQ", row["GDSEQ"].ToString());
            defaultObj.Add("BARCODE", row["BARCODE"].ToString());
            defaultObj.Add("GDNAME", row["GDNAME"].ToString());
            defaultObj.Add("GDSPEC", row["GDSPEC"].ToString());
            defaultObj.Add("UNIT", row["UNIT"].ToString());
            defaultObj.Add("UNITNAME", row["UNITNAME"].ToString());
            defaultObj.Add("BZSL", row["BZSL"].ToString());
            defaultObj.Add("CH", row["CH"].ToString());
            defaultObj.Add("BZHL", row["BZHL"].ToString());
            defaultObj.Add("DHSL", "1");
            defaultObj.Add("JXTAX", row["JXTAX"].ToString());
            defaultObj.Add("HSJJ", row["HSJJ"].ToString());
            defaultObj.Add("HSJE", row["HSJE"].ToString());
            defaultObj.Add("CHJE", row["CHJE"].ToString());
            defaultObj.Add("ZPBH", row["ZPBH"].ToString());
            defaultObj.Add("PRODUCER", row["PRODUCER"].ToString());
            defaultObj.Add("PRODUCERNAME", row["PRODUCERNAME"].ToString());
            defaultObj.Add("HWID", row["HWID"].ToString());
            defaultObj.Add("PH", row["PH"].ToString());
            defaultObj.Add("PZWH", row["PZWH"].ToString());
            defaultObj.Add("RQ_SC", row["RQ_SC"].ToString());
            defaultObj.Add("YXQZ", row["YXQZ"].ToString());
            defaultObj.Add("MEMO", row["MEMO"].ToString());
            defaultObj.Add("ISLOT", row["ISLOT"].ToString());
            if (flag == "DSC")
            {
                defaultObj.Add("STR2", row["STR2"].ToString());
            }
            if (firstRow)
            {
                int    rowIndex     = GridGoods.SelectedRowIndex;
                string deleteScript = GridGoods.GetDeleteRowReference(rowIndex);
                PageContext.RegisterStartupScript(deleteScript + GridGoods.GetAddNewRecordReference(defaultObj, rowIndex));
            }
            else
            {
                PageContext.RegisterStartupScript(GridGoods.GetAddNewRecordReference(defaultObj, true));
            }
        }
Ejemplo n.º 5
0
        protected override void billDelRow()
        {
            if (docFLAG.SelectedValue != "N")
            {
                Alert.Show("非新增单据不能删除!");
                return;
            }
            if (GridGoods.SelectedCell == null)
            {
                return;
            }
            int rowIndex = GridGoods.SelectedRowIndex;

            PageContext.RegisterStartupScript(GridGoods.GetDeleteRowReference(rowIndex));
            PubFunc.FormLock(FormDoc, true, "");
            tbxINSERT.Enabled = true;
        }
Ejemplo n.º 6
0
 protected override void billDelRow()
 {
     if (docFLAG.SelectedValue != "M")
     {
         Alert.Show("非『新增』单据不能删行!", "消息提示", MessageBoxIcon.Warning);
         return;
     }
     if (GridGoods.SelectedCell == null || GridGoods.SelectedRowIndex == -1)
     {
         Alert.Show("请选择数据行删除!", "消息提示", MessageBoxIcon.Warning);
         return;
     }
     else
     {
         int rowIndex = GridGoods.SelectedRowIndex;
         PageContext.RegisterStartupScript(GridGoods.GetDeleteRowReference(rowIndex));
     }
 }