Beispiel #1
0
        /// <summary>
        /// 判断什么未填写,返回对应的标签
        /// </summary>
        /// <returns></returns>
        private string CheckNull()
        {
            if (string.IsNullOrEmpty(txtcInvCode.Text))
            {
                return("编码");
            }
            //if (string.IsNullOrEmpty(txtcOrderNumber.Text))
            //    return "客户订单号";
            if (string.IsNullOrEmpty(txtFBatchNo.Text))
            {
                return("生产批号");
            }
            if (!dtpdDate.Checked)
            {
                return("日期");
            }
            var cmdInvCode = new SqlCommand("select * from t_icItem where FNumber=@FNumber");

            cmdInvCode.Parameters.AddWithValue("@FNumber", txtcInvCode.Value);
            var wfun = new WmsFunction(BaseStructure.KisConstring);

            if (!wfun.BoolExistTable(cmdInvCode))
            {
                return(@"编码不正确,编码");
            }
            //if (dataInventory.ShiftDetail.Rows.Count < 1)
            //    return "子件";
            return(uneiQuantity.Value == null || string.IsNullOrEmpty(uneiQuantity.Value.ToString()) ? "数量" : string.Empty);
        }
Beispiel #2
0
        /// <summary>
        /// 判断什么未填写,返回对应的标签
        /// </summary>
        /// <returns></returns>
        private string CheckNull()
        {
            if (string.IsNullOrEmpty(txtcInvCode.Text))
            {
                return("编码");
            }
            if (string.IsNullOrEmpty(txtcLotNo.Text))
            {
                return("批号");
            }
            if (!dtpdDate.Checked)
            {
                return("日期");
            }
            if (!dtpcDefine2.Checked)
            {
                return("供应商生产日期");
            }
            if (dtpcDefine2.Value > dtpdDate.Value)
            {
                return("供应商生产日期必需小于进货日期");
            }
            var cmdInvCode = new SqlCommand("select * from t_icItem where FNumber=@FNumber");

            cmdInvCode.Parameters.AddWithValue("@FNumber", txtcInvCode.Value);
            var wfun = new WmsFunction(BaseStructure.KisConstring);

            if (!wfun.BoolExistTable(cmdInvCode))
            {
                return(@"编码不正确,编码");
            }
            return(uneiQuantity.Value == null || string.IsNullOrEmpty(uneiQuantity.Value.ToString()) ? "数量" : string.Empty);
        }
Beispiel #3
0
        /// <summary>
        /// 是否有权限操作
        /// </summary>
        /// <returns></returns>
        private bool CanOperator(string cKey)
        {
            var cmd   = new SqlCommand("select * from BRoleFunction where rCode=@rCode and fCode=@fCode and isnull(bRight,0)=1");
            var rCode = BaseStructure.LoginRoleId;

            if (string.IsNullOrEmpty(rCode))
            {
                rCode = BaseStructure.LoginId;
            }
            cmd.Parameters.AddWithValue("@rCode", rCode);
            cmd.Parameters.AddWithValue("@fCode", cKey);
            var wf = new WmsFunction(BaseStructure.WmsCon);

            return(wf.BoolExistTable(cmd));
        }
Beispiel #4
0
 /// <summary>
 /// 判断什么未填写,返回对应的标签
 /// </summary>
 /// <returns></returns>
 private string CheckNull()
 {
     if (string.IsNullOrEmpty(txtcInvCode.Text))
         return "编码";
     //if (string.IsNullOrEmpty(txtcOrderNumber.Text))
     //    return "客户订单号";
     if(string.IsNullOrEmpty(txtFBatchNo.Text))
     {
         return "生产批号";
     }
     if (!dtpdDate.Checked)
         return "日期";var cmdInvCode = new SqlCommand("select * from t_icItem where FNumber=@FNumber");
     cmdInvCode.Parameters.AddWithValue("@FNumber", txtcInvCode.Value);
     var wfun = new WmsFunction(BaseStructure.KisConstring);
     if (!wfun.BoolExistTable(cmdInvCode))
     {
         return @"编码不正确,编码";
     }
     //if (dataInventory.ShiftDetail.Rows.Count < 1)
     //    return "子件";
     return uneiQuantity.Value == null || string.IsNullOrEmpty(uneiQuantity.Value.ToString()) ? "数量" : string.Empty;
 }
Beispiel #5
0
 /// <summary>
 /// 是否有权限操作
 /// </summary>
 /// <returns></returns>
 private bool CanOperator(string cKey)
 {
     var cmd = new SqlCommand("select * from BRoleFunction where rCode=@rCode and fCode=@fCode and isnull(bRight,0)=1");
     var rCode = BaseStructure.LoginRoleId;
     if (string.IsNullOrEmpty(rCode))
         rCode = BaseStructure.LoginId;
     cmd.Parameters.AddWithValue("@rCode", rCode);
     cmd.Parameters.AddWithValue("@fCode", cKey);
     var wf = new WmsFunction(BaseStructure.WmsCon);
     return wf.BoolExistTable(cmd);
 }
Beispiel #6
0
 /// <summary>
 /// 判断什么未填写,返回对应的标签
 /// </summary>
 /// <returns></returns>
 private string CheckNull()
 {
     if (string.IsNullOrEmpty(txtcInvCode.Text))
         return "编码";
     if (string.IsNullOrEmpty(txtcLotNo.Text))
         return "批号";
     if (!dtpdDate.Checked)
         return "日期";
     if (!dtpcDefine2.Checked)
         return "供应商生产日期";
     if(dtpcDefine2.Value>dtpdDate.Value)
     {
         return "供应商生产日期必需小于进货日期";
     }
     var cmdInvCode = new SqlCommand("select * from t_icItem where FNumber=@FNumber");
     cmdInvCode.Parameters.AddWithValue("@FNumber", txtcInvCode.Value);
     var wfun = new WmsFunction(BaseStructure.KisConstring);
     if (!wfun.BoolExistTable(cmdInvCode))
     {
         return @"编码不正确,编码";
     }
     return uneiQuantity.Value == null || string.IsNullOrEmpty(uneiQuantity.Value.ToString()) ? "数量" : string.Empty;
 }