Example #1
0
        //public Blitemmove(DataRow d)
        //{
        //    var dr = (DsInventory.ITEMTRANSFERMAINRow) d;
        //    ItemtransfermainRow = dr;
        //     if(!string.IsNullOrEmpty(dr.TRANID))
        //         Tranid = dr.TRANID;
        //     Trandate = dr.TRANDATE;
        //    Hold = dr.HOLD;
        //    Movetype = dr.TTYPE;
        //    Netvalue = dr.TOTVALUE;

        //}
        public  string DoSave()
        {
            var dm = new ItemMoveDataManager();
           
            var retval = dm.DoSave(ItemtransfermainRow, Itemtransferdetail,Stype);
            if (retval == "1")
            {
                Tranid = Utils.Tranid;
            }
            return retval;
        }
Example #2
0
        public static void DoPrint(string tranid)
        {
            var dm = new ItemMoveDataManager();
            var rpt = new Reports.RptItemMove { Company = Utils.Companyname , Header = "Item Transfer"};
            var ds = dm.RptItemMove(tranid, Utils.Company);
            rpt.DataSource = ds;
            ReportPrintTool printTool = new ReportPrintTool(rpt);
            
            printTool.ShowPreview();

      
            
        }
Example #3
0
 private decimal GetCost(object p)
 {
     decimal retval = 0m;
     try
     
     {
     var d = (DataRowView)p;
     retval= new ItemMoveDataManager().GetTranferCostValue(d[0].ToString(),_usemultistore,_localconstr);
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.ToString());
     }
     return retval;
 }
Example #4
0
 public string GetSalesStore()
 {
     var bl = new ItemMoveDataManager();
     return bl.GetSalesStore();
 }
Example #5
0
 void DoUploadItemTransfers()
 {
     txtstatus.Caption = "Uploading Item Transfer";
     Application.DoEvents();
     progressPanel1.Visible = true;
     try
     {
         var dm = new ItemMoveDataManager();
         var dt = dm.GetItemTranferToTransfer();
         var syc = new RemoteSync();
         var dtw = ClsGetData.GetMyWareHouses();
         bool isStore = dtw.Rows.Count > 0;
         if (dt.Rows.Count == 0)
         {
             var drd = _dsdownload.NewRow();
             drd[0] = "";
             drd[1] = DateTime.Now.Date;
             drd[2] = "Item transfer";
             drd[3] = "Nothing to Upload ";
             _dsdownload.Rows.Add(drd);
             return;
         }
         foreach (DsInventory.ITEMTRANSFERMAINRow dr in dt.Rows)
         {
             //if (Utils.PingServer())
             //{
                 if (isStore)
                 {
                     var drd1 = _dsdownload.NewRow();
                     var retval = syc.DoUpLoadItems(dr.TRANID, false);
                     if (retval == "1")
                     {
                         drd1[0] = dr.TRANID;
                         drd1[1] = DateTime.Now.Date;
                         drd1[2] = "Item Master - Item Transfer";
                         drd1[3] = "Upload ";
                     }
                     else
                     {
                         drd1[0] = dr.TRANID;
                         drd1[1] = DateTime.Now.Date;
                         drd1[2] = "Item Master - Item Transfer";
                         drd1[3] = "Error   '" + retval + "'";
                     }
                     _dsdownload.Rows.Add(drd1);
                 }
                 var drd = _dsdownload.NewRow();
                 drd[0] = dr.TRANID;
                 drd[1] = DateTime.Now.Date;
                 drd[2] = "Item transfer";
                 var ret = syc.DoSaveItemTranferInRemote(dr, dm.GetItemTransferDetailById(dr.TRANID));
                 if (ret == "1")
                 {
                     dm.UpdatedSyn(dr.TRANID);
                     drd[3] = "Uploaded";
                 }
                 else
                 {
                     drd[3] = "Error  " + ret;
                 }
                 _dsdownload.Rows.Add(drd);
             }
             //else
             //{
             //    XtraMessageBox.Show("Failed to connect server ", "POS", MessageBoxButtons.OK,
             //        MessageBoxIcon.Information);
             //}
         // }
     }
     catch (Exception exp)
     {
         XtraMessageBox.Show(exp.ToString(), "POS", MessageBoxButtons.OK,MessageBoxIcon.Information);
     }
 }
Example #6
0
 public void DeleteItemMove(string tranid)
 {
     var da = new ItemMoveDataManager();
     da.DeleteItemMove(tranid);
 }
Example #7
0
 public bool DoSave()
 {
     bool retval = false;
     var ta = new DISKDETAILSTableAdapter {Connection = {ConnectionString = _constr}};
     var taitemove = new ItemMoveDataManager();
     var taitemtran = new ITEMTRANSFERMAINTableAdapter {Connection = {ConnectionString = _constr}};
     taitemtran.DiskCreated(Tranid);
     var taauto = new DataManager();
     retval = ta.Insert(fileno, DateTime.Now, Utils.Userid, Tranid, Utils.Company, ftype) > 0;
     //   taitemove.UpdateFileNo(fileno, Tranid);
     taauto.UpdateAutoNum(5);
     return retval;
 }