コード例 #1
0
    public static string getproductbatch(string dataname, string fromid)
    {
        StorageManageModel smm = new StorageManageModel();
        string             sdr = smm.getproductbatchbydrugnamemedical(dataname, fromid);

        return(sdr);
    }
コード例 #2
0
    protected void ExportMedicineInventoryInfor_Click(object sender, EventArgs e)
    {
        string DrugName1 = DrugName.Value;

        string Warehouse1 = Warehouse.Value;

        if (DrugName1 == "" || DrugName1 == "0")
        {
            DrugName1 = "0";
        }

        if (Warehouse1 == "" || Warehouse1 == "0")
        {
            Warehouse1 = "0";
        }
        StorageManageModel rm = new StorageManageModel();

        // DataBaseLayer db = new DataBaseLayer();
        //    string str = "select * from lossiInfor where type ='" + type + "'";
        DataTable dt = rm.druginventory(DrugName1, Warehouse1);

        System.DateTime currentTime = new System.DateTime();
        currentTime = System.DateTime.Now;
        string now = currentTime.ToString("yyyyMMdd");

        CreateExcel(dt, "application/ms-excel", "药房库存信息" + now);
    }
コード例 #3
0
    public static string serchDrugInfo(string text)
    {
        StorageManageModel smm = new StorageManageModel();
        string             sdr = smm.getdrugname(text);

        return(sdr);
    }
コード例 #4
0
    public static string serchDrugInfo(string text, string fromid)
    {
        StorageManageModel smm = new StorageManageModel();
        string             sdr = smm.getdrugnamemedical(text, fromid);

        return(sdr);
    }
コード例 #5
0
    public static string getproductbatch(string dataname)
    {
        StorageManageModel smm = new StorageManageModel();
        string             sdr = smm.getproductbatchbydrugname(dataname);

        return(sdr);
    }
コード例 #6
0
    public static int enterStorage(string strRowIds, string Warehouse1, string intoman, string OSingle1, string OSTime1)
    {
        int result = 0;

        System.DateTime currentTime = new System.DateTime();
        currentTime = System.DateTime.Now; //获取当前时间

        //  string currentTime1 = currentTime.ToString();
        //单号
        string now = currentTime.ToString("yyyyMMddhhmmss");
        string Num = "RK" + now; //单号



        string[] strRowsId = strRowIds.Split(',');

        for (int i = 0; i < strRowsId.Length; i++)
        {
            StorageManageModel smm = new StorageManageModel();
            result = smm.AddStorage(strRowsId[i].ToString(), Warehouse1, intoman, OSingle1, OSTime1, currentTime, Num);
        }


        return(result);
    }
コード例 #7
0
    public static string getdrugnum(string dataname)
    {
        StorageManageModel smm = new StorageManageModel();
        string             sdr = smm.getdrugnumbydrugname(dataname);

        return(sdr);
    }
コード例 #8
0
    public static string getdruginfobydrugnum(string drugnum, string fromid)
    {
        string result = "";


        //string str2 = str1.TrimStart('0');
        WarehousepharmacyModel whm  = new WarehousepharmacyModel();
        SqlDataReader          sdr  = whm.findgrudinfobydrugnumsecond(drugnum);
        SqlDataReader          sdr2 = whm.findgrudinfobydrugnumfromstoragedrug(drugnum);


        StorageManageModel smm = new StorageManageModel();

        int remainingnum = smm.remainingnummedical(fromid, drugnum);


        if (sdr.Read())
        {
            if (sdr2.Read())
            {
                result = sdr["DrugType"].ToString() + "," + sdr["DrugCode"] + "," + sdr["PurUnits"] + "," + sdr["DrugName"] + "," + sdr["DrugSpecificat"]
                         + "," + sdr["PositionNum"] + "," + sdr["Univalent"] + "," + sdr["Mnemonic"] + "," + sdr["Rmarkes"]
                         + "," + sdr["Producer"] + "," + sdr["ProducingArea"] + "," + sdr["StorageTime"] + "," + sdr["LowerLimit"]
                         + "," + sdr["UpperLimit"] + "," + sdr["Rmarkes2"] + "," + sdr["Rmarkes3"] + "," + remainingnum + "," + sdr2["ProDate"] + "," + sdr2["ExpiryDate"] + "," + sdr2["Quality"] + "," + sdr2["LicenseNum"] + "," + sdr2["Rmarkes"];
            }
        }


        return(result);
    }
コード例 #9
0
    //提供数据的方法
    public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p)
    {
        dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult();
        result.page  = p.page; //设定当前返回的页号
        result.total = 100;    //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际



        string fromid = "0";

        if (p.extParam.ContainsKey("fromid"))
        {
            fromid = p.extParam["fromid"];
        }


        if (fromid == "" || fromid == "0")
        {
            fromid = "0";
        }



        StorageManageModel smm = new StorageManageModel();

        result.table = smm.findStoragebyfromid(fromid);

        return(result);
    }
コード例 #10
0
    //提供数据的方法
    public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p)
    {
        dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult();
        result.page  = p.page; //设定当前返回的页号
        result.total = 100;    //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际



        string medicalname = "0";

        if (p.extParam.ContainsKey("medicalname"))
        {
            medicalname = p.extParam["medicalname"];
        }


        if (medicalname == "" || medicalname == "0")
        {
            medicalname = "0";
        }



        string hospitalname = "0";

        if (p.extParam.ContainsKey("hospitalname"))
        {
            hospitalname = p.extParam["hospitalname"];
        }


        if (hospitalname == "" || hospitalname == "0")
        {
            hospitalname = "0";
        }



        string hospitaldrugname = "";

        if (p.extParam.ContainsKey("hospitaldrugname"))
        {
            hospitaldrugname = p.extParam["hospitaldrugname"];
        }


        if (hospitaldrugname == "" || hospitaldrugname == "0")
        {
            hospitaldrugname = "0";
        }


        StorageManageModel smm = new StorageManageModel();

        result.table = smm.finddrugmatchdone(medicalname, hospitalname, hospitaldrugname);

        return(result);
    }
コード例 #11
0
    public static int ischeckoutnum(string num, string fromid, string drugnum)
    {
        StorageManageModel smm = new StorageManageModel();
        int result             = smm.ischeckoutnummedical(num, fromid, drugnum);



        return(result);
    }
コード例 #12
0
    public static int enterMedicineStorage(string strRowIds, string Warehouse1, string intoman, string OSingle1, string OSTime1)
    {
        int result = 0;

        string[] strRowsId = strRowIds.Split(',');

        for (int i = 0; i < strRowsId.Length; i++)
        {
            StorageManageModel smm = new StorageManageModel();
            result = smm.AddMedicineStorage(strRowsId[i].ToString(), Warehouse1, intoman, OSingle1, OSTime1);
        }


        return(result);
    }
コード例 #13
0
    public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p)
    {
        dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult();
        result.page  = p.page; //设定当前返回的页号
        result.total = 100;    //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际

        StorageManageModel rm = new StorageManageModel();



        result.table = rm.searchStorageInfochange();


        return(result);
    }
コード例 #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["id"] != null)
        {
            int id = Convert.ToInt16(Request.QueryString["id"]);
            idnum1.Value = Request.QueryString["id"].ToString();
            StorageManageModel wr = new StorageManageModel();
            DataTable          dt = wr.LossiInforInfo(id);

            Type1.Value    = dt.Rows[0]["Type"].ToString();
            Per1.Value     = dt.Rows[0]["Per"].ToString();
            Reason1.Value  = dt.Rows[0]["Reason"].ToString();
            lossnum1.Value = dt.Rows[0]["lossnum"].ToString();
            Rmarkes1.Value = dt.Rows[0]["remark"].ToString();
        }
    }
コード例 #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["id"] != null)
        {
            int id = Convert.ToInt16(Request.QueryString["id"]);
            idnum1.Value = Request.QueryString["id"].ToString();
            StorageManageModel wr = new StorageManageModel();
            DataTable          dt = wr.fdrugtoroomInfo(id);

            Amount1.Value     = dt.Rows[0]["num"].ToString();
            Rmarkes1.Value    = dt.Rows[0]["remark"].ToString();
            ProDate1.Value    = dt.Rows[0]["productdate"].ToString();
            ExpiryDate1.Value = dt.Rows[0]["validedate"].ToString();
            Quality1.Value    = dt.Rows[0]["quality"].ToString();
            LicenseNum1.Value = dt.Rows[0]["permitNo"].ToString();
        }
    }
コード例 #16
0
    public static string lossiInforInfo(int id, string Type, string Per, string Reason, string lossnum, string Rmarkes)
    {
        StorageManageModel wr = new StorageManageModel();
        int result            = wr.LossiInforInfo(id, Type, Per, Reason, lossnum, Rmarkes);

        string str = null;

        if (result == 0)
        {
            str = "0";
        }
        else
        {
            str = "1";
        }

        return(str);
    }
コード例 #17
0
    public static string StorageInfo(int id, string Warehouse, string Amount, string Rmarkes, string ProDate, string ExpiryDate, string Quality, string LicenseNum, string OSingle, string OSTime, string Warehousing)
    {
        StorageManageModel wr = new StorageManageModel();
        int result            = wr.StoragequeryInfo(id, Warehouse, Amount, Rmarkes, ProDate, ExpiryDate, Quality, LicenseNum, OSingle, OSTime, Warehousing);

        string str = null;

        if (result == 0)
        {
            str = "0";
        }
        else
        {
            str = "1";
        }

        return(str);
    }
コード例 #18
0
    protected void ExportStoreHouse_Click(object sender, EventArgs e)
    {
        string STime       = STimeL.Value;
        string ETime       = ETimeL.Value;
        string Warehousing = Warehousing1.Value;
        string DrugName    = DrugName1.Value;


        StorageManageModel rm = new StorageManageModel();

        DataTable dt = rm.findStorageListInfo1(STime, ETime, Warehousing, DrugName);

        System.DateTime currentTime = new System.DateTime();
        currentTime = System.DateTime.Now;
        string now = currentTime.ToString("yyyyMMdd");

        CreateExcel(dt, "application/ms-excel", "调拨列表信息" + now);
    }
コード例 #19
0
    public static string StorageListInfo(int id, string Amount, string Rmarkes, string ProDate, string ExpiryDate, string Quality, string LicenseNum)
    {
        StorageManageModel wr = new StorageManageModel();
        int result            = wr.StorageInfo(id, Amount, Rmarkes, ProDate, ExpiryDate, Quality, LicenseNum);

        string str = null;

        if (result == 0)
        {
            str = "0";
        }
        else
        {
            str = "1";
        }

        return(str);
    }
コード例 #20
0
    public static string getproductbatchbyid(string fromid)
    {
        /* int result = 0;
         * string[] strRowsId = strRowIds.Split(',');
         *
         * for (int i = 0; i < strRowsId.Length; i++)
         * {
         *
         *   StorageManageModel smm = new StorageManageModel();
         *   result = smm.AddStorage(strRowsId[i].ToString(), Warehouse1, intoman, OSingle1, OSTime1);
         *
         * }
         */

        StorageManageModel smm = new StorageManageModel();
        string             sr  = smm.findproductbatchbyfromiddrug(fromid);



        return(sr);
    }
コード例 #21
0
    public static string deleteStorageById(string strRowIds)
    {
        string result = "";
        int    sdr    = 0;

        string[] strRowsId = strRowIds.Split(',');
        for (int i = 0; i < strRowsId.Length; i++)
        {
            StorageManageModel rm = new StorageManageModel();
            sdr = rm.deleteStoragequeryInfor(Convert.ToInt16(strRowsId[i]));
        }
        if (sdr == 0)
        {
            result = "0";
        }
        else
        {
            result = "1";
        }

        return(result);
    }
コード例 #22
0
    public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid3DataHandler(dotNetFlexGrid.DataHandlerParams p)
    {
        dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult();
        result.page  = p.page; //设定当前返回的页号
        result.total = 100;    //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际

        StorageManageModel rm = new StorageManageModel();


        string operatenum = "";

        if (p.extParam.ContainsKey("operatenum"))
        {
            operatenum = p.extParam["operatenum"];
        }



        result.table = rm.findstoragefromdruginfobyopertatenum(operatenum);

        return(result);
    }
コード例 #23
0
    public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid2DataHandler(dotNetFlexGrid.DataHandlerParams p)
    {
        dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult();
        result.page  = p.page; //设定当前返回的页号
        result.total = 100;    //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际

        StorageManageModel rm = new StorageManageModel();

        string LSTime = "";

        if (p.extParam.ContainsKey("LSTime"))
        {
            LSTime = p.extParam["LSTime"];
        }
        string LETime = "";

        if (p.extParam.ContainsKey("LETime"))
        {
            LETime = p.extParam["LETime"];
        }
        string Warehousing = "";

        if (p.extParam.ContainsKey("Warehousing"))
        {
            Warehousing = p.extParam["Warehousing"];
        }
        string DrugName = "";

        if (p.extParam.ContainsKey("DrugName"))
        {
            DrugName = p.extParam["DrugName"];
        }

        result.table = rm.findStorageListInfo1(LSTime, LETime, Warehousing, DrugName);


        return(result);
    }
コード例 #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            WarehousepharmacyModel hm  = new WarehousepharmacyModel();
            SqlDataReader          sdr = hm.findWarehouseInfo();
            if (sdr != null)
            {
                while (sdr.Read())
                {
                    this.Warehouse12.Items.Add(new ListItem(sdr["WName"].ToString()));
                }
            }
        }
        if (Request.QueryString["id"] != null)
        {
            int id = Convert.ToInt16(Request.QueryString["id"]);
            idnum1.Value = Request.QueryString["id"].ToString();
            StorageManageModel wr = new StorageManageModel();
            DataTable          dt = wr.findStorageListInfo(id);

            Warehouse12.Value = dt.Rows[0]["Warehouse"].ToString();

            Amount1.Value = dt.Rows[0]["Amount"].ToString();

            Rmarkes1.Value    = dt.Rows[0]["Rmarkes"].ToString();
            ProDate1.Value    = dt.Rows[0]["ProDate"].ToString();
            ExpiryDate1.Value = dt.Rows[0]["ExpiryDate"].ToString();
            Quality1.Value    = dt.Rows[0]["Quality"].ToString();

            LicenseNum1.Value   = dt.Rows[0]["LicenseNum"].ToString();
            OSingle12.Value     = dt.Rows[0]["OSingle"].ToString();
            OSTime1.Value       = dt.Rows[0]["OSTime"].ToString();
            Warehousing12.Value = dt.Rows[0]["Warehousing"].ToString();
        }
    }
コード例 #25
0
    }  //提供数据的方法

    public dotNetFlexGrid.DataHandlerResult DotNetFlexGrid1DataHandler(dotNetFlexGrid.DataHandlerParams p)
    {
        dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult();
        result.page  = p.page; //设定当前返回的页号
        result.total = 100;    //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际

        StorageManageModel rm = new StorageManageModel();


        var DrugName = "";

        if (p.extParam.ContainsKey("DrugName"))
        {
            DrugName = p.extParam["DrugName"];
        }

        string Warehouse = "";

        if (p.extParam.ContainsKey("Warehouse"))
        {
            Warehouse = p.extParam["Warehouse"];
        }

        //int pageSize = p.rp;
        // result.table = rm.finInventoryInfor(DrugName, Warehouse);
        //result.table = dotNetFlexGrid.DemoMemoryTable(p.page * 100, p.rp);//调用演示的数据生成函数产生模拟数据
        if (DrugName == "" || DrugName == "0")
        {
            DrugName = "0";
        }

        if (Warehouse == "" || Warehouse == "0")
        {
            Warehouse = "0";
        }



        result.table = rm.druginventory(DrugName, Warehouse);


        dotNetFlexGrid.FieldFormatorHandle proc3 = delegate(DataRow dr)
        {
            string ActualCapacity = "";

            if (dr["ActualCapacity"].ToString() == "0")
            {
                return(ActualCapacity = dr["kucun"].ToString());
            }
            else
            {
                return(dr["ActualCapacity"].ToString());
            }
        };



        dotNetFlexGrid.FieldFormatorHandle proc4 = delegate(DataRow dr)
        {
            if (dr["ActualCapacity"].ToString() == "0")
            {
                return("0");
            }
            else
            {
                int a = Convert.ToInt32(dr["kucun"].ToString()) - Convert.ToInt32(dr["ActualCapacity"].ToString());
                if (a < 0)
                {
                    a = -a;
                }
                return(a.ToString());
            }
        };



        //result.FieldFormator.Register("famount", proc6);
        //result.FieldFormator.Register("iamount", proc5);
        result.FieldFormator.Register("ActualCapacity", proc3);
        result.FieldFormator.Register("chazhi", proc4);



        return(result);
    }