Exemple #1
0
 public void InitializeApp()
 {
     DS_xydw_krly = B_xydw_krly.GetList("id>=0" + common_file.common_app.yydh_select + " order by id");
     bindingSource1.DataSource = DS_xydw_krly.Tables[0];
     dg_count = DS_xydw_krly.Tables[0].Rows.Count;
     this.dg_xydwkrly.AutoGenerateColumns = false;
 }
Exemple #2
0
        /// <summary>
        /// 用于门店下载协议价格
        /// </summary>
        /// <returns></returns>
        public static string DownLoad_Yxydw_fjrb()
        {
            BLL.Yxydw_fjrb   B_Yxydw     = new BLL.Yxydw_fjrb();
            Model.Yxydw_fjrb M_Yxydw     = new Model.Yxydw_fjrb();
            string           s           = common_file.common_app.get_failure;
            DataSet          DS_download = new DataSet();

            object[] args = new object[2];
            args[0] = yydh;
            args[1] = DS_download;
            object result = jdgl_res_head_app.DynamicWebServiceCall.InvokeWebService(url, "Yxydw_fjrb_download", args);

            if (result.ToString() == common_file.common_app.get_suc)
            {
                DS_download = (DataSet)args[1];//下载好后把值传给本地数据库
                foreach (DataRow dr in DS_download.Tables[0].Rows)
                {
                    string xyh_service = dr["xyh"].ToString();//读取协议号
                    string strfjrb     = dr["fjrb"].ToString();
                    M_Yxydw.qymc      = dr["qymc"].ToString();
                    M_Yxydw.yydh      = dr["yydh"].ToString();
                    M_Yxydw.xyh       = xyh_service;
                    M_Yxydw.xydw      = dr["xydw"].ToString();
                    M_Yxydw.sjjg      = Convert.ToDecimal(dr["sjjg"].ToString());
                    M_Yxydw.is_top    = Convert.ToBoolean(dr["is_top"].ToString());
                    M_Yxydw.is_select = Convert.ToBoolean(dr["is_select"].ToString());
                    M_Yxydw.fjrb      = strfjrb;
                    M_Yxydw.fjrb_code = dr["fjrb_code"].ToString();
                    //根据会员卡号读出相同的数据如果相同就修改,不然就直接下载到会员表
                    DataSet DS_xyglservice = new DataSet();
                    DS_xyglservice = B_Yxydw.GetList("xyh='" + xyh_service + "' and fjrb='" + strfjrb + "'");
                    if (DS_xyglservice != null && DS_xyglservice.Tables[0].Rows.Count > 0)
                    {
                        M_Yxydw.id = Convert.ToInt32(DS_xyglservice.Tables[0].Rows[0]["id"].ToString());
                        if (B_Yxydw.Update(M_Yxydw))
                        {
                            s = common_file.common_app.get_suc;
                        }
                    }
                    else
                    {
                        if (B_Yxydw.Add(M_Yxydw) > 0)
                        {
                            s = common_file.common_app.get_suc;
                        }
                    }
                }
                Common.AddMsg(DS_download, "下载协议价");
            }
            return(s);
        }
Exemple #3
0
        /// <summary>
        /// 供门店下载网上协议价
        /// </summary>
        /// <param name="yydh"></param>
        /// <param name="DS_download"></param>
        /// <returns></returns>
        public string Yxydw_fjrb_download(string yydh, out DataSet DS_download)
        {
            Model.Yxydw_fjrb M_xydwfjrb = new Model.Yxydw_fjrb();
            BLL.Yxydw_fjrb   B_xydwfjrb = new BLL.Yxydw_fjrb();
            string           ss         = common_file.common_app.get_failure;

            DS_download = null;
            DataSet DS_Yxydw;

            DS_Yxydw = B_xydwfjrb.GetList(1000, "yydh='" + yydh + "' and is_xz=0", "id");
            if (DS_Yxydw != null)
            {
                DS_download = DS_Yxydw;
                common_file.common_is_select.Updat_is_select02(DS_download, "Yxydw_fjrb");
                ss = common_file.common_app.get_suc;
            }
            return(ss);
        }