Ejemplo n.º 1
0
    protected void GV_ResultDetail_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (isExport && e.Row.RowType == DataControlRowType.DataRow)
        {
            CycleCountResult ccr        = (CycleCountResult)e.Row.DataItem;
            Label            lblDiffQty = (Label)e.Row.FindControl("lblDiffQty");
            Label            lblQty     = (Label)e.Row.FindControl("lblQty");
            if (ccr.DiffQty == 0)
            {
                lblDiffQty.Text = "${MasterData.Inventory.Stocktaking.Equal}";
            }
            else if (ccr.DiffQty > 0)
            {
                lblDiffQty.Text = "${MasterData.Inventory.Stocktaking.Profit}";
            }
            else
            {
                lblDiffQty.Text = "${MasterData.Inventory.Stocktaking.Shortage}";
            }

            lblQty.Text = ccr.Qty > ccr.InvQty ? ccr.Qty.ToString("0.######") : ccr.InvQty.ToString("0.######");

            e.Row.Cells[0].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
            e.Row.Cells[2].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
            e.Row.Cells[5].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
            e.Row.Cells[6].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
        }
    }
Ejemplo n.º 2
0
 protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         CycleCountResult cycleCountResult = (CycleCountResult)e.Row.DataItem;
         ((TextBox)e.Row.FindControl("tbDiffReason")).ReadOnly = (cycleCountResult.CycleCount.Status != BusinessConstants.CODE_MASTER_STATUS_VALUE_SUBMIT);
     }
 }
Ejemplo n.º 3
0
 protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         CheckBox         checkBoxGroup    = e.Row.FindControl("CheckBoxGroup") as CheckBox;
         CycleCountResult cycleCountResult = (CycleCountResult)e.Row.DataItem;
         if (cycleCountResult.CycleCount != null && cycleCountResult.CycleCount.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_COMPLETE)
         {
             checkBoxGroup.Visible = cycleCountResult.IsProcessed == null;
         }
     }
 }
Ejemplo n.º 4
0
    protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            CycleCountResult cycleCountResult = (CycleCountResult)e.Row.DataItem;
            CheckBox         checkBoxGroup    = e.Row.FindControl("CheckBoxGroup") as CheckBox;

            if (this.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_COMPLETE)
            {
                if (cycleCountResult.CycleCount != null && !cycleCountResult.CycleCount.IsScanHu)
                {
                    checkBoxGroup.Visible = cycleCountResult.IsProcessed == null;
                }
                else
                {
                    //checkBoxGroup.Visible = cycleCountResult.ShortageQty > 0 || cycleCountResult.ProfitQty > 0;
                    // IList<CycleCountResult> cycleCountResultList = TheCycleCountMgr.ListCycleCountResultDetail(this.Code, this.cbShortage.Checked, this.cbProfit.Checked, false, cycleCountResult.StorageBin, cycleCountResult.Item.Code);
                    // var qCnt = cycleCountResultList.Where(c => c.IsProcessed == null).Count();
                    // checkBoxGroup.Visible = qCnt != 0;
                    //checkBoxGroup.Visible = true;
                }
            }
            if (isExport)
            {
                e.Row.Cells[1].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
                e.Row.Cells[3].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
                e.Row.Cells[6].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
                e.Row.Cells[7].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
                e.Row.Cells[8].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
                e.Row.Cells[9].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
                e.Row.Cells[10].Attributes.Add("style", "vnd.ms-excel.numberformat:@");
                e.Row.Cells[11].Attributes.Add("style", "vnd.ms-excel.numberformat:@");

                this.SetLinkButton(e.Row, "lblShortageQty", cycleCountResult.ShortageQty != null && cycleCountResult.ShortageQty != 0);
                this.SetLinkButton(e.Row, "lblProfitQty", cycleCountResult.ProfitQty != null && cycleCountResult.ProfitQty != 0);
                this.SetLinkButton(e.Row, "lblEqualQty", cycleCountResult.EqualQty != null && cycleCountResult.EqualQty != 0);
            }
        }
    }
 public virtual void DeleteCycleCountResult(CycleCountResult entity)
 {
     entityDao.DeleteCycleCountResult(entity);
 }
 public virtual void UpdateCycleCountResult(CycleCountResult entity)
 {
     entityDao.UpdateCycleCountResult(entity);
 }
 public virtual void CreateCycleCountResult(CycleCountResult entity)
 {
     entityDao.CreateCycleCountResult(entity);
 }
Ejemplo n.º 8
0
 public virtual void DeleteCycleCountResult(CycleCountResult entity)
 {
     Delete(entity);
 }
Ejemplo n.º 9
0
 public virtual void UpdateCycleCountResult(CycleCountResult entity)
 {
     Update(entity);
 }
Ejemplo n.º 10
0
 public virtual void CreateCycleCountResult(CycleCountResult entity)
 {
     Create(entity);
 }