コード例 #1
0
        private void Initialize()
        {
            skinComboBoxShopID.Initialize();
            CommonGlobalUtil.SetBrand(skinComboBox_Brand);
            SetYear();
            CommonGlobalUtil.SetParameterConfig(skinComboBox_Season, ParameterConfigKey.Season);
            this.CostumeCurrentShopTextBox1.Text = string.Empty;

            SetStoreType();
            SetDisplay();
        }
コード例 #2
0
ファイル: CostumeInfoText.cs プロジェクト: jollitycn/JGNet
 protected void ShowError(Exception ex)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new CJBasic.CbGeneric <Exception>(this.ShowError), ex);
     }
     else
     {
         CommonGlobalUtil.ShowError(ex);
     }
 }
コード例 #3
0
ファイル: BaseForm.cs プロジェクト: jollitycn/JGNet
 protected void UnLockPage()
 {
     if (this.InvokeRequired)
     {
         this.BeginInvoke(new  CbGeneric(this.UnLockPage));
     }
     else
     {
         CommonGlobalUtil.UnLockPage(this);
     }
 }
コード例 #4
0
ファイル: ListGiftTicketForm.cs プロジェクト: jollitycn/JGNet
 //点击确认按钮
 private void BaseButton_OK_Click(object sender, EventArgs e)
 {
     try
     {
         this.DialogResult = DialogResult.OK;
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.ShowError(ee);
     }
 }
コード例 #5
0
        internal void ShowDialog(CheckStoreOrder order)
        {
            datastarttime = DateTime.Now;
            this.Initialize(order);
            DateTime endtime = DateTime.Now;
            TimeSpan span    = (TimeSpan)(endtime - starTime);

            CommonGlobalUtil.WriteLog("盘点汇总数盈亏明细界面加载开始时间:" + starTime + " 结束时间:" + endtime + " 总耗时数:" + span.TotalSeconds + "秒");

            this.ShowDialog();
        }
コード例 #6
0
 private void BindingDataSource(List <PfCustomerDetail> listPage)
 {
     foreach (var item in listPage)
     {
         item.CostumeName     = CommonGlobalCache.GetCostumeName(item.CostumeID);
         item.SizeDisplayName = CommonGlobalUtil.GetCostumeSizeName(item.CostumeID, item.SizeName);
         item.OrgCount        = item.Count;
     }
     this.dataGridViewPagingSumCtrl.BindingDataSource <PfCustomerDetail>
         (listPage);
 }
コード例 #7
0
ファイル: BaseUserControl.cs プロジェクト: jollitycn/JGNet
 protected void WriteLog(Exception ex)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new CJBasic.CbGeneric <Exception>(this.WriteLog), ex);
     }
     else
     {
         CommonGlobalUtil.WriteLog(ex);
     }
 }
コード例 #8
0
ファイル: BaseUserControl.cs プロジェクト: jollitycn/JGNet
 protected void WriteLog(String content)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new  CJBasic.CbGeneric <String>(this.WriteLog), content);
     }
     else
     {
         CommonGlobalUtil.WriteLog(content);
     }
 }
コード例 #9
0
 public void ShowDialog(Supplier supplier)
 {
     try
     {
         this.supplier = supplier;
         this.ShowDialog();
     }
     catch (Exception ex)
     {
         CommonGlobalUtil.ShowError(ex);
     }
 }
コード例 #10
0
ファイル: EmPfCostumeForm.cs プロジェクト: jollitycn/JGNet
        private void BaseButton1_Click(object sender, EventArgs e)
        {
            try
            {
                isBarCode = false;
                string costumeID = this.skinTextBox1.SkinTxt.Text.Trim();
                if (string.IsNullOrEmpty(costumeID))
                {
                    return;
                }
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }


                //条形码,先根据条形码获取款号
                //List<BarCode> barCodes = GlobalCache.BarCodeList?.FindAll(t => t.BarCodeValue.ToUpper().Contains(costumeID.ToUpper()));

                ////,条形码为一条,找到这个款号
                //if (barCodes != null && barCodes.Count == 1)
                //{
                //    costumeID = barCodes[0].CostumeID;
                //    this.skinTextBox1.SkinTxt.Text = barCodes[0].BarCodeValue;
                //    isBarCode = true;
                //}
                if (costumeID.Length == 15)
                {
                    BarCode4Costume costume = CommonGlobalUtil.GetBarCode(costumeID);
                    if (costume != null)
                    {
                        costumeID = costume.CostumeID;
                        skinTextBox1.SkinTxt.Text = costume.BarCode;
                        isBarCode = true;
                    }
                }
                List <Costume> resultList = CommonGlobalCache.CostumeList.FindAll(t => (t.ID.ToUpper().Contains(costumeID.ToUpper()) || t.Name.ToUpper().Contains(costumeID.ToUpper())) && t.PfShowOnline == isEmOnline);
                if (filterValid)
                {
                    resultList = resultList.FindAll(t => t.IsValid);
                }
                this.SetDataSource(resultList);
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }

            finally
            {
                UnLockPage();
            }
        }
コード例 #11
0
ファイル: SupllierComboBox.cs プロジェクト: jollitycn/JGNet
        private void skinLabelAdd_Click(object sender, EventArgs e)
        {
            try
            {
                //    if (GlobalUtil.EngineUnconnectioned(this)) { return; }
                List <Supplier>         list    = (List <Supplier>) this.skinComboBox.DataSource;
                NewSupplierComboBoxForm addForm = new NewSupplierComboBoxForm(list);
                if (addForm.ShowDialog(this) == DialogResult.OK)
                {
                    if (list == null)
                    {
                        list = new List <Supplier>();
                    }
                    Supplier item     = addForm.Result;
                    Supplier listItem = list.Find(t => t.Name == item.Name || t.ID == item.ID);
                    if (listItem == null)
                    {
                        item.Enabled    = true;
                        item.CreateTime = DateTime.Now;
                        InteractResult result = CommonGlobalCache.SupplierList_OnChange(item);
                        switch (result.ExeResult)
                        {
                        case ExeResult.Success:
                            this.skinComboBox.DataSource = null;
                            list.Add(item);
                            this.skinComboBox.DisplayMember = "Name";
                            this.skinComboBox.ValueMember   = "ID";
                            this.skinComboBox.DataSource    = list;
                            this.skinComboBox.SelectedIndex = list.IndexOf(item);
                            break;

                        case ExeResult.Error:
                            break;

                        default:
                            break;
                        }
                    }
                    else
                    {
                        //   this.skinComboBoxBigClass.SelectedItem = listItem;
                    }
                }
            }
            catch (Exception ex)
            {
                CommonGlobalUtil.ShowError(ex);
            }
            finally
            {
                //GlobalUtil.UnLockPage(this);
            }
        }
コード例 #12
0
        private void Initialize()
        {
            CommonGlobalUtil.SetBrand(skinComboBox_Brand);
            skinComboBoxSupplier.Initialize(false, true, 1);
            this.CostumeCurrentShopTextBox1.Text = string.Empty;

            CommonGlobalUtil.SetCostumeColor(this.skinComboBox_Color);
            SetDisplay();
            SetYear();
            CommonGlobalUtil.SetParameterConfig(skinComboBox_Season, ParameterConfigKey.Season);
            BindingCostumeStoreDataSource(null);
        }
コード例 #13
0
 private void FilterColor(Costume costume)
 {
     if (costume != null)
     {
         String[] colors = costume.Colors.Split(',');
         CommonGlobalUtil.SetCostumeColor(this.skinComboBox_Color, false, colors);
     }
     else
     {
         CommonGlobalUtil.SetCostumeColor(this.skinComboBox_Color, false, null, false);
     }
 }
コード例 #14
0
 private void skinTreeViewPermisson_AfterCheck(object sender, TreeViewEventArgs e)
 {
     try
     {
         TreeNode node = e.Node;
         CheckNode(node);
     }
     catch (Exception ex)
     {
         CommonGlobalUtil.ShowError(ex);
     }
 }
コード例 #15
0
 //点击查询按钮
 private void BaseButton_Search_Click(object sender, EventArgs e)
 {
     try
     {
         List <GuideAchievementDetail> list = CommonGlobalCache.ServerProxy.GetGuideAchievementDetails(pagePara);
         this.BindingRetailOrderDataSource(list);
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.ShowError(ee);
     }
 }
コード例 #16
0
        /// <summary>
        /// 绑定RetailOrder数据源
        /// </summary>
        /// <param name="listPage"></param>
        private void BindingRetailOrderDataSource(List <GuideAchievementDetail> list)
        {
            if (list != null && list.Count > 0)
            {
                foreach (var item in list)
                {
                    item.SizeDisplayName = CommonGlobalUtil.GetCostumeSizeName(item.CostumeID, item.SizeName);
                }
            }

            this.dataGridViewPagingSumCtrl.BindingDataSource(list);
        }
コード例 #17
0
 /*  CosCloud VedioCosCloud;
  *
  * private EmCostumePhoto UploadPhotoToCos(PhotoData para, string customerID)
  * {
  *    InteractResult<CosCloudSignature> Signatureresult = GlobalCache.ServerProxy.GetCosCloudSignature();
  *    if (Signatureresult.ExeResult == ExeResult.Success)
  *    {
  *        CosCloudSignature cosCloudSignature = Signatureresult.Data;
  *
  *        VedioCosCloud = new CosCloud(cosCloudSignature.AppID, cosCloudSignature.Signature, 120);
  *
  *
  *        para.Name = JGNet.Core.ImageHelper.GetNewJpgName(customerID);
  *        // CosCloud cos = new CosCloud(cosLoginInfo.AppID, cosLoginInfo.SecretId, cosLoginInfo.SecretKey);
  *        Dictionary<string, string> uploadParasDic = new Dictionary<string, string>();
  *        uploadParasDic.Add(CosParameters.PARA_BIZ_ATTR, "");
  *        uploadParasDic.Add(CosParameters.PARA_INSERT_ONLY, "0");
  *        string result = VedioCosCloud.UploadFile2(cosCloudSignature.BucketName, string.Format("/{0}/{1}", customerID, para.Name),
  *            para.Name, para.Datas, uploadParasDic);
  *        // JObject jObject = (JObject)JsonConvert.DeserializeObject(result);
  *        ResultJson ResultJ = (ResultJson)JavaScriptConvert.DeserializeObject(result, typeof(ResultJson));
  *        if (ResultJ.code.ToString() == "0")
  *        {
  *            Data dInfo = ResultJ.data;
  *            string source_url = dInfo.source_url.ToString();
  *            EmCostumePhoto CurCostmePhotoVideo = new EmCostumePhoto();
  *
  *            CurCostmePhotoVideo.LinkAddress = dInfo.source_url;
  *            CurCostmePhotoVideo.IsVideo = false;
  *            CurCostmePhotoVideo.PhotoName = para.Name;
  *            CurCostmePhotoVideo.CostumeID = para.EmCostumePhoto.CostumeID;
  *            CurCostmePhotoVideo.DisplayIndex = para.EmCostumePhoto.DisplayIndex;
  *
  *            return CurCostmePhotoVideo;
  *            //para.LinkAddress = source_url;
  *            //???  this.dbManager.DBEmPosterImageService.Insert(para.EmPosterImage);
  *        }
  *        else
  *        {
  *            throw new Exception(string.Format("上传【{0}】图片发生错误-【{1}】", para.Name, result));
  *        }
  *    }
  *    return new EmCostumePhoto();
  * }*/
 private void DoNotify()
 {
     try
     {
         //图片保存成功,通知商户网站地址,账套信息,款号
         String response = CommonGlobalUtil.BusinessWebCostumePhotoChangeNotify(item.ID);
     }
     catch (Exception ex)
     {
         ShowError(ex);
     }
 }
コード例 #18
0
 private void BaseButtonRemoveAll_Click(object sender, EventArgs e)
 {
     try
     {
         this.targets = null;
         this.dataGridViewTarget.DataSource = null;
     }
     catch (Exception ex)
     {
         CommonGlobalUtil.ShowError(ex);
     }
 }
コード例 #19
0
 private void BindingOutboundDetailSource(List <RetailDetail> list)
 {
     if (list != null && list.Count > 0)
     {
         foreach (RetailDetail detail in list)
         {
             detail.CostumeName     = CommonGlobalCache.GetCostumeName(detail.CostumeID);
             detail.SizeDisplayName = CommonGlobalUtil.GetCostumeSizeName(detail.CostumeID, detail.SizeName);
         }
     }
     this.dataGridViewPagingSumCtrl.BindingDataSource(list);
 }
コード例 #20
0
        internal void ShowDialog(GetCostumeInvoicingDetailPara changePara)
        {
            para = new GetCostumeInvoicingDetailPara();
            ReflectionHelper.CopyProperty(changePara, para);
            CommonGlobalUtil.SetCostomerSaleType(skinComboBox_Type);
            Search(CostumeInvoicingDetailInType.All);

            /* if (!String.IsNullOrEmpty(para.CostumeID)) {
             *   this.Text += ":款号-" + para.CostumeID;
             * }*/
            this.ShowDialog();
        }
コード例 #21
0
 public void ShowDialog(PfOrder record)
 {
     try
     {
         this.record = record;
         this.ShowDialog();
     }
     catch (Exception ex)
     {
         CommonGlobalUtil.ShowError(ex);
     }
 }
コード例 #22
0
 //点击按钮移除右边所有服装
 private void BaseButtonRemoveAll_Click(object sender, EventArgs e)
 {
     try
     {
         this.RightCostume.Clear();
         this.SetRightDataSource();
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.ShowError(ee);
     }
 }
コード例 #23
0
        private void BindingSource()
        {
            if (this.models != null && this.models.Count > 0)
            {
                foreach (var item in models)
                {
                    item.DisplaySizeName = CommonGlobalUtil.GetCostumeSizeName(item.CostumeID, item.SizeName);
                }
            }

            dataGridViewPagingSumCtrl.BindingDataSource <DifferenceDetailConfirmModel>(models);
        }
コード例 #24
0
        public RefundDirectCtrl(RetailOrder order)
        {
            InitializeComponent();
            Init();
            this.order = order;

            if (!HasPermission(RolePermissionMenuEnum.销售退货单查询, RolePermissionEnum.重做_单据时间))
            {
                dateTimePicker_Start.Enabled = false;
            }

            List <RetailDetail> details = CommonGlobalCache.ServerProxy.GetRetailDetailList(order.ID);

            if (!String.IsNullOrEmpty(order.MemeberID))
            {
                memberIDTextBox2.Text = order.MemeberID;
                memberIDTextBox2.Search();
            }
            //guideComboBox2.SelectedValue = order.GuideID;
            guideComboBox1.SelectedValue = order.OperateGuideID;
            dateTimePicker_Start.Value   = order.CreateTime;
            string       selectShopid = ValidateUtil.CheckEmptyValue(order.ShopID);
            List <Guide> guideList    = CommonGlobalCache.GuideList.FindAll(t => t.State == 0 && t.ShopID == selectShopid);



            if (details != null)
            {
                foreach (var item in details)
                {
                    this.GuideName.DataSource    = guideList;
                    this.GuideName.DisplayMember = "Name";
                    this.GuideName.ValueMember   = "ID";
                    item.CostumeName             = CommonGlobalCache.GetCostumeName(item.CostumeID);
                    item.SizeDisplayName         = CommonGlobalUtil.GetCostumeSizeName(item.CostumeID, item.SizeName);
                    item.BuyCount            = -item.BuyCount;
                    item.SumMoney            = -item.SumMoney;
                    item.IsRefund            = true;
                    item.RefundCount         = item.BuyCount;
                    item.SumMoneyActual      = -item.SumMoneyActual;
                    item.IsUseTickets        = false;
                    item.Discount            = 100;
                    item.DiscountOrigin      = 100;
                    item.AllowReviseDiscount = true;
                    item.CostPrice           = -item.CostPrice;
                    item.SumCost             = -item.SumCost;
                    item.GuideID             = item.GuideID;
                }
            }
            retailDetailList = details;
            dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(retailDetailList));
        }
コード例 #25
0
        public static List <CostumeStore> GetCostumeStores(CostumeItem costumeItem, bool addEmptyStore)
        {
            List <CostumeStore> storeList = new List <CostumeStore>();

            try
            {
                String[] colors = CommonGlobalUtil.GetStringSplit(costumeItem.Costume.Colors, ',');
                if (colors != null && colors.Length > 0)
                {
                    //判断颜色是否有库存信息
                    if (costumeItem.CostumeStoreList != null)
                    {
                        storeList.AddRange(costumeItem.CostumeStoreList);

                        if (colors.Length > costumeItem.CostumeStoreList.Count)
                        {
                            if (addEmptyStore)
                            {
                                foreach (var color in colors)
                                {
                                    if (!costumeItem.CostumeStoreList.Exists(t => t.ColorName == color))
                                    {
                                        storeList.Add(SetupStores(costumeItem, color));
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        if (addEmptyStore)
                        {
                            //创建虚拟库存信息
                            foreach (var color in colors)
                            {
                                //color not existed,then add one
                                storeList.Add(SetupStores(costumeItem, color));
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                CommonGlobalUtil.ShowError(ex);
            }
            foreach (var item in storeList)
            {
                item.CostumeName = CommonGlobalCache.GetCostumeName(item.CostumeID);
            }
            return(storeList);
        }
コード例 #26
0
 /// <summary>
 /// 绑定RetailDetail数据源并设置下方的Label值
 /// </summary>
 private void BindingDataSource(List <DayBenefitReportDetail> retailDetailList)
 {
     if (retailDetailList != null && retailDetailList.Count > 0)
     {
         foreach (DayBenefitReportDetail detail in retailDetailList)
         {
             detail.CostumeName     = CommonGlobalCache.GetCostumeName(detail.CostumeID);
             detail.SizeDisplayName = CommonGlobalUtil.GetCostumeSizeName(detail.CostumeID, detail.SizeName);
             //   detail.GuideName = CommonGlobalCache.GetUserName(detail.gu)
         }
     }
     dataGridViewPagingSumCtrl.BindingDataSource <DayBenefitReportDetail>(DataGridViewUtil.ToDataTable(retailDetailList));
 }
コード例 #27
0
 private void baseButtonPick_Click(object sender, EventArgs e)
 {
     try
     {
         AllocateOrderPickForm tiDanForm = new AllocateOrderPickForm();
         tiDanForm.HangedOrderSelected += TiDanForm_HangedOrderSelected;//提单被选择后触发
         tiDanForm.ShowDialog();
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.WriteLog(ee);
     }
 }
コード例 #28
0
 public void Search()
 {
     try
     {
         InteractResult <List <RechargeRecord> > memberList = CommonGlobalCache.ServerProxy.GetRechargeRecords4Day(this.memberPhone, Memberitem.DateInt);
         dataGridViewPagingSumCtrl.BindingDataSource(memberList.Data);
     }
     catch (Exception ex) { CommonGlobalUtil.ShowError(ex); }
     finally
     {
         UnLockPage();
     }
 }
コード例 #29
0
        //点击查询按钮
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            try
            {
                InteractResult <List <RetailDetail> > list = CommonGlobalCache.ServerProxy.GetGuideReatil4Days(this.curShopid, this.curGuid, this.curDay);

                this.BindingRetailOrderDataSource(list.Data);
            }
            catch (Exception ee)
            {
                CommonGlobalUtil.ShowError(ee);
            }
        }
コード例 #30
0
ファイル: AddPaymentForm.cs プロジェクト: jollitycn/JGNet
 public void ShowNew(Control parent)
 {
     try
     {
         this.TopMost = true;
         this.ShowDialog(parent);
         this.TopMost = false;
     }
     catch (Exception ex)
     {
         CommonGlobalUtil.ShowError(ex);
     }
 }